Topic Monitor
Monitor topics continuously and alert only when something looks relevant.
What’s new in v1.5.0
- - RSS/Atom feed monitoring as a first-class source via INLINECODE0
- GitHub release monitoring via
github_repos → INLINECODE2 - Feed auto-discovery from normal URLs
- OPML import for feed lists
- Advanced filters with
required_keywords and INLINECODE4 - Sentiment analysis on findings:
positive, negative, neutral, INLINECODE8 - Sentiment shift alerts with INLINECODE9
Quick start
CODEBLOCK0
Then test it:
CODEBLOCK1
Core model
Each topic can mix multiple sources:
- - Web search via INLINECODE10
- RSS/Atom feeds via INLINECODE11
- GitHub releases via INLINECODE12
All collected results flow into the same pipeline:
- 1. gather results
- deduplicate
- apply advanced filters
- score importance
- classify sentiment
- alert immediately or save for digest
- track state and sentiment history
Topic config
Each topic supports these keys:
- - INLINECODE13
- INLINECODE14
- INLINECODE15
- INLINECODE16
- INLINECODE17
- INLINECODE18
- INLINECODE19
- INLINECODE20
- INLINECODE21 → INLINECODE22
- INLINECODE23 → INLINECODE24
- INLINECODE25
- INLINECODE26
- INLINECODE27
- INLINECODE28
- INLINECODE29
- INLINECODE30
Example config
CODEBLOCK2
Advanced filters
required_keywords
All listed terms must appear in the title/snippet before scoring.
CODEBLOCK3
exclude_keywords
Any matching term filters the result out before scoring.
CODEBLOCK4
This is intentionally simple boolean logic:
- - any exclude match → reject
- any missing required term → reject
RSS/Atom feeds
Direct feeds
CODEBLOCK5
Feed discovery
Discover feeds from a normal website URL:
CODEBLOCK6
Add a topic and auto-discover feeds in one step:
CODEBLOCK7
OPML import
Import feed subscriptions from an OPML file:
CODEBLOCK8
Imported topics default to daily / medium unless you override:
CODEBLOCK9
Feed caching
Feed polling uses feedparser and stores per-feed cache data in monitor state:
- - INLINECODE34
- INLINECODE35
- last check metadata
That allows efficient conditional requests and avoids reprocessing unchanged feeds.
GitHub release monitoring
Track repo releases with:
CODEBLOCK10
These map to GitHub Atom feeds automatically:
- - INLINECODE36
- INLINECODE37
CLI example:
CODEBLOCK11
GitHub release items are labeled clearly in alerts.
Sentiment analysis
Each scored finding also gets a sentiment label:
- - INLINECODE38
- INLINECODE39
- INLINECODE40
- INLINECODE41
Alerts and digest entries include that sentiment.
Sentiment shift alerts
Enable:
CODEBLOCK12
When enabled, a result that changes sentiment versus the topic’s previous sentiment history gets promoted for alerting.
State tracks:
- - INLINECODE42
- INLINECODE43
Scripts
scripts/manage_topics.py
CODEBLOCK13
scripts/monitor.py
CODEBLOCK14
Alert output
Alerts can now include:
- - source label (
Web, Feed, GitHub Release) - score and reason
- sentiment
- sentiment shift marker when applicable
Installation note
Feed support uses Python feedparser.
Install if needed:
CODEBLOCK15
Troubleshooting
Feeds not showing results
- - verify the feed URL manually
- try
discover-feed against the site URL - install INLINECODE51
- run INLINECODE52
Too much noise
- - tighten INLINECODE53
- add INLINECODE54
- increase INLINECODE55
Missing GitHub release alerts
- - confirm repo is INLINECODE56
- verify releases exist on GitHub
- test with INLINECODE57
Notes
- - Search and feed results are merged into the same scoring pipeline.
- Existing web-search behavior remains supported.
- Digest entries store sentiment so weekly output reflects tone changes too.
主题监控
持续监控主题,仅在发现相关内容时发出警报。
v1.5.0 新特性
- - RSS/Atom 订阅源监控 作为一级数据源,通过 feeds 配置
- GitHub 发布监控 通过 githubrepos 配置 → https://github.com/{owner}/{repo}/releases.atom
- 订阅源自动发现 从普通 URL 自动发现
- OPML 导入 支持导入订阅列表
- 高级过滤器 支持 requiredkeywords 和 excludekeywords
- 情感分析 对发现内容进行情感分类:positive、negative、neutral、mixed
- 情感转变警报 通过 alertonsentimentshift 配置
快速开始
bash
python3 scripts/quick.py AI Model Releases
python3 scripts/quick.py OpenClaw Releases --github-repos openclaw/openclaw
python3 scripts/quick.py Security Advisories --feeds https://example.com/security.xml
然后进行测试:
bash
python3 scripts/monitor.py --dry-run --verbose
核心模型
每个主题可以混合多种数据源:
- - 网络搜索 通过 query 配置
- RSS/Atom 订阅源 通过 feeds 配置
- GitHub 发布 通过 github_repos 配置
所有收集的结果进入同一处理管道:
- 1. 收集结果
- 去重
- 应用高级过滤器
- 评分重要性
- 情感分类
- 立即警报或保存到摘要
- 跟踪状态和情感历史
主题配置
每个主题支持以下键:
- - id
- name
- query
- keywords
- feeds
- githubrepos
- requiredkeywords
- excludekeywords
- frequency → hourly|daily|weekly
- importancethreshold → high|medium|low
- channels
- context
- alerton
- alertonsentimentshift
- ignoresources
- boostsources
配置示例
json
{
topics: [
{
id: openclaw-news,
name: OpenClaw 更新,
query: OpenClaw AI assistant update release,
keywords: [OpenClaw, release, update],
feeds: [https://example.com/blog/rss.xml],
github_repos: [openclaw/openclaw],
required_keywords: [release],
exclude_keywords: [rumor, affiliate],
frequency: daily,
importance_threshold: medium,
channels: [telegram],
context: 跟踪产品更新和发布,
alerton: [keywordexactmatch, githubrelease],
alertonsentiment_shift: true,
ignore_sources: [],
boost_sources: [github.com]
}
]
}
高级过滤器
required_keywords
所有列出的关键词必须出现在标题/摘要中,才会进入评分阶段。
json
required_keywords: [release, stable]
exclude_keywords
任何匹配的关键词都会在评分前过滤掉该结果。
json
exclude_keywords: [beta, rumor, affiliate]
这是有意设计的简单布尔逻辑:
- - 匹配任何排除关键词 → 拒绝
- 缺少任何必需关键词 → 拒绝
RSS/Atom 订阅源
直接添加订阅源
bash
python3 scripts/manage_topics.py add 安全订阅 \
--feeds https://example.com/rss.xml,https://example.com/atom.xml \
--keywords security,CVE,patch
订阅源发现
从普通网站 URL 发现订阅源:
bash
python3 scripts/manage_topics.py discover-feed https://example.com/blog
python3 scripts/monitor.py --discover-feed https://example.com/blog
一步完成添加主题和自动发现订阅源:
bash
python3 scripts/manage_topics.py add 供应商博客 \
--discover-feeds https://example.com/blog \
--keywords release,announcement
OPML 导入
从 OPML 文件导入订阅:
bash
python3 scripts/manage_topics.py import-opml feeds.opml
导入的主题默认为每日/中等重要性,除非你覆盖设置:
bash
python3 scripts/manage_topics.py import-opml feeds.opml --frequency hourly --importance high
订阅源缓存
订阅源轮询使用 feedparser,并在监控状态中存储每个订阅源的缓存数据:
- - etag
- last-modified
- 上次检查元数据
这样可以实现高效的条件请求,避免重复处理未变更的订阅源。
GitHub 发布监控
跟踪仓库发布:
json
github_repos: [openclaw/openclaw, anthropics/claude-code]
这些会自动映射到 GitHub Atom 订阅源:
- - https://github.com/openclaw/openclaw/releases.atom
- https://github.com/anthropics/claude-code/releases.atom
命令行示例:
bash
python3 scripts/manage_topics.py add CLI 发布 \
--github-repos openclaw/openclaw,anthropics/claude-code \
--keywords release,version
GitHub 发布条目会在警报中清晰标注。
情感分析
每个评分结果还会获得情感标签:
- - positive
- negative
- neutral
- mixed
警报和摘要条目都会包含情感信息。
情感转变警报
启用:
json
alertonsentiment_shift: true
启用后,如果结果的情感与主题之前的情感历史发生变化,该结果会被提升为警报。
状态跟踪:
- - lastsentiment
- sentimenthistory
脚本
scripts/manage_topics.py
bash
添加主题
python3 scripts/manage_topics.py add 主题名称 \
--query 搜索查询 \
--keywords 关键词1,关键词2 \
--feeds https://example.com/rss.xml \
--github-repos openclaw/openclaw \
--required-keywords release \
--exclude-keywords beta,rumor
列出主题
python3 scripts/manage_topics.py list
编辑主题
python3 scripts/manage_topics.py edit topic-id --feeds https://example.com/rss.xml
发现订阅源
python3 scripts/manage_topics.py discover-feed https://example.com/blog
导入 OPML
python3 scripts/manage_topics.py import-opml feeds.opml
测试主题
python3 scripts/manage_topics.py test topic-id
scripts/monitor.py
bash
python3 scripts/monitor.py
python3 scripts/monitor.py --dry-run
python3 scripts/monitor.py --topic openclaw-news --verbose
python3 scripts/monitor.py --discover-feed https://example.com/blog
警报输出
警报现在可以包含:
- - 来源标签(Web、Feed、GitHub Release)
- 评分和原因
- 情感
- 情感转变标记(如适用)
安装说明
订阅源支持使用 Python 的 feedparser。
如需安装:
bash
pip3 install feedparser
故障排除
订阅源不显示结果
- - 手动验证订阅源 URL
- 尝试对网站 URL 使用 discover-feed
- 安装 feedparser
- 运行 python3 scripts/monitor.py --dry-run --verbose
噪音太多
- - 收紧 requiredkeywords
- 添加 excludekeywords
- 提高 importance_threshold
缺少 GitHub 发布警报
- - 确认仓库格式为 owner/repo
- 验证 GitHub 上存在发布
- 使用 --verbose 测试
注意事项
- - 搜索和订阅源结果会合并到同一个评分管道中。
- 现有的网络搜索功能仍然支持。
- 摘要条目会存储情感信息,以便周报也能反映情感变化。