Topic Monitor技能使用说明
2026-03-27
新闻来源:网淘吧
围观:16
电脑广告
手机广告
主题监控
持续监控主题,仅在相关内容出现时发出警报。
v1.5.0 版本的新功能
- RSS/Atom 源监控作为主要来源,通过
feeds - GitHub 发布监控通过
github_repos→https://github.com/{owner}/{repo}/releases.atom - 源自动发现从普通 URL 中
- OPML 导入用于源列表
- 高级过滤器带有
required_keywords和exclude_keywords - 情感分析针对发现内容:
积极、消极中性混合情感转变警报通过 - alert_on_sentiment_shift快速开始
然后测试它:
核心模型
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"
每个主题可以混合多个来源:
python3 scripts/monitor.py --dry-run --verbose
网络搜索
通过
- 查询RSS/Atom 订阅源
通过 - feedsGitHub 发布
通过 - github_repos所有收集到的结果都流入同一管道:
收集结果
去重
- 应用高级过滤器
- 重要性评分
- 情感分类
- score importance
- classify sentiment
- 立即提醒或保存为摘要
- 跟踪状态和情绪历史
主题配置
每个主题支持以下键:
id名称查询关键词订阅源GitHub 仓库必需关键词排除关键词频率→每小时|每日|每周重要性阈值→高|中|低渠道上下文触发提醒条件情绪变化时触发提醒忽略来源提升来源权重
配置示例
{
"topics": [
{
"id": "openclaw-news",
"name": "OpenClaw Updates",
"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": "Track product updates and releases",
"alert_on": ["keyword_exact_match", "github_release"],
"alert_on_sentiment_shift": true,
"ignore_sources": [],
"boost_sources": ["github.com"]
}
]
}
高级筛选器
所需关键词
所有列出的术语必须在评分前出现在标题/摘要中。
"required_keywords": ["release", "stable"]
排除关键词
任何匹配的术语都会在评分前过滤掉结果。
"exclude_keywords": ["beta", "rumor", "affiliate"]
这是特意设计的简单布尔逻辑:
- 任何排除匹配 → 拒绝
- 任何所需术语缺失 → 拒绝
RSS/Atom 订阅源
直接订阅源
python3 scripts/manage_topics.py add "Security Feeds" \
--feeds "https://example.com/rss.xml,https://example.com/atom.xml" \
--keywords "security,CVE,patch"
订阅源发现
从普通网站 URL 发现订阅源:
python3 scripts/manage_topics.py discover-feed https://example.com/blog
python3 scripts/monitor.py --discover-feed https://example.com/blog
添加一个主题并一步自动发现订阅源:
python3 scripts/manage_topics.py add "Vendor Blog" \
--discover-feeds "https://example.com/blog" \
--keywords "release,announcement"
OPML 导入
从 OPML 文件导入订阅源订阅:
python3 scripts/manage_topics.py import-opml feeds.opml
导入的主题默认为每日/中等频率,除非您覆盖设置:
python3 scripts/manage_topics.py import-opml feeds.opml --frequency hourly --importance high
订阅源缓存
订阅源轮询使用feedparser并将每个订阅源的缓存数据存储在监控状态中:
etaglast-modified- 最后检查元数据
这允许高效的条件请求,并避免重新处理未更改的订阅源。
GitHub 发布监控
使用以下方式追踪仓库发布:
"github_repos": ["openclaw/openclaw", "anthropics/claude-code"]
这些会自动映射到 GitHub Atom 订阅源:
https://github.com/openclaw/openclaw/releases.atomhttps://github.com/anthropics/claude-code/releases.atom
命令行界面示例:
python3 scripts/manage_topics.py add "CLI Releases" \
--github-repos "openclaw/openclaw,anthropics/claude-code" \
--keywords "release,version"
GitHub 发布项在警报中会被清晰地标注。
情感分析
每个经过评分的结果也会获得一个情感标签:
积极消极中性混合
警报和摘要条目都包含该情感信息。
情感转变警报
启用:
"alert_on_sentiment_shift": true
启用后,如果某个结果的情感与该主题先前的情感历史记录相比发生变化,则会提升其警报优先级。
状态追踪:
last_sentimentsentiment_history
脚本
scripts/manage_topics.py
# Add topic
python3 scripts/manage_topics.py add "Topic Name" \
--query "search query" \
--keywords "word1,word2" \
--feeds "https://example.com/rss.xml" \
--github-repos "openclaw/openclaw" \
--required-keywords "release" \
--exclude-keywords "beta,rumor"
# List topics
python3 scripts/manage_topics.py list
# Edit topic
python3 scripts/manage_topics.py edit topic-id --feeds "https://example.com/rss.xml"
# Discover feeds
python3 scripts/manage_topics.py discover-feed https://example.com/blog
# Import OPML
python3 scripts/manage_topics.py import-opml feeds.opml
# Test topic
python3 scripts/manage_topics.py test topic-id
scripts/monitor.py
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
警报输出
警报现在可以包含:
- 来源标签(
网页、订阅源、GitHub 发布) - 评分和原因
- 情感
- 适用时的情感变化标记
安装说明
订阅源支持使用 Python 的feedparser库。
如有需要,请安装:
pip3 install feedparser
故障排除
订阅源未显示结果
- 请手动验证订阅源 URL
- 尝试
探索订阅源针对网站URL - 安装
feedparser - 运行
python3 scripts/monitor.py --dry-run --verbose
噪声过多
- 收紧
required_keywords - 添加
exclude_keywords - 提高
importance_threshold
缺少GitHub版本发布提醒
- 确认仓库是
所有者/仓库名 - 在GitHub上验证存在版本发布
- 测试使用
--verbose
注意事项
- 搜索和订阅源结果会合并到相同的评分流程中。
- 现有的网页搜索行为仍受支持。
- 摘要条目会存储情感信息,因此每周输出也能反映语气变化。
文章底部电脑广告
手机广告位-内容正文底部


微信扫一扫,打赏作者吧~