网淘吧来吧,欢迎您!

返回首页 微信
微信
手机版
手机版

Topic Monitor技能使用说明

2026-03-27 新闻来源:网淘吧 围观:16
电脑广告
手机广告

主题监控

持续监控主题,仅在相关内容出现时发出警报。

v1.5.0 版本的新功能

  • RSS/Atom 源监控作为主要来源,通过feeds
  • GitHub 发布监控通过github_reposhttps://github.com/{owner}/{repo}/releases.atom
  • 源自动发现从普通 URL 中
  • OPML 导入用于源列表
  • 高级过滤器带有required_keywordsexclude_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所有收集到的结果都流入同一管道:收集结果

去重

  1. 应用高级过滤器
  2. 重要性评分
  3. 情感分类
  4. score importance
  5. classify sentiment
  6. 立即提醒或保存为摘要
  7. 跟踪状态和情绪历史

主题配置

每个主题支持以下键:

  • 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并将每个订阅源的缓存数据存储在监控状态中:

  • etag
  • last-modified
  • 最后检查元数据

这允许高效的条件请求,并避免重新处理未更改的订阅源。

GitHub 发布监控

使用以下方式追踪仓库发布:

"github_repos": ["openclaw/openclaw", "anthropics/claude-code"]

这些会自动映射到 GitHub Atom 订阅源:

  • https://github.com/openclaw/openclaw/releases.atom
  • https://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_sentiment
  • sentiment_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

注意事项

  • 搜索和订阅源结果会合并到相同的评分流程中。
  • 现有的网页搜索行为仍受支持。
  • 摘要条目会存储情感信息,因此每周输出也能反映语气变化。

天猫隐藏优惠券

网淘吧

免责申明
部分文章来自各大搜索引擎,如有侵权,请与我联系删除。
打赏
文章底部电脑广告
手机广告位-内容正文底部

相关文章

您是本站第291861名访客 今日有273篇新文章/评论