newsclawd

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

NewsClawd 🦞📰

NewsClawd 🦞📰

Automated news monitoring and alerting system for your personal AI assistant.
面向个人AI助手的自动化新闻监控与警报系统。

What It Does

核心功能

  • X/Twitter Monitoring: Track specific accounts, keywords, hashtags
  • Crypto Price Alerts: Binance integration for price thresholds
  • RSS News Feeds: Monitor blogs, news sites, subreddits
  • Web Scraping: Check websites for changes
  • Smart Filtering: AI-powered relevance scoring
  • Multi-Channel Alerts: Telegram, Discord, email notifications
  • X/Twitter监控:追踪特定账号、关键词、话题标签
  • 加密货币价格警报:集成Binance实现价格阈值提醒
  • RSS新闻源:监控博客、新闻网站、subreddits
  • 网页抓取:检测网站内容变更
  • 智能过滤:AI驱动的相关性评分
  • 多渠道警报:支持Telegram、Discord、邮件通知

When to Use

适用场景

  • User says "monitor X for Y" or "alert me when..."
  • User wants price alerts on crypto
  • User wants to track specific Twitter accounts
  • User mentions "news about..." or "keep me updated on..."
  • Setting up cron-based monitoring jobs
  • 用户表示"monitor X for Y"或者"alert me when..."
  • 用户需要加密货币价格警报
  • 用户想要追踪特定Twitter账号
  • 用户提到"news about..."或者"keep me updated on..."
  • 设置基于cron的定时监控任务

Core Components

核心组件

1. Quick Monitoring Setup

1. 快速监控配置

bash
undefined
bash
undefined

Monitor a Twitter account

Monitor a Twitter account

newsclawd twitter --account @elonmusk --keywords "AI,tesla,spacex"
newsclawd twitter --account @elonmusk --keywords "AI,tesla,spacex"

Set crypto price alert

Set crypto price alert

newsclawd crypto --symbol BTCUSDT --above 70000 --below 60000
newsclawd crypto --symbol BTCUSDT --above 70000 --below 60000

RSS feed monitoring

RSS feed monitoring

newsclawd rss --url https://feeds.bbci.co.uk/news/rss.xml --keywords "AI,technology"
newsclawd rss --url https://feeds.bbci.co.uk/news/rss.xml --keywords "AI,technology"

Website change detection

Website change detection

newsclawd web --url https://example.com --selector ".price" --interval 1h
undefined
newsclawd web --url https://example.com --selector ".price" --interval 1h
undefined

2. Configuration

2. 配置文件

Config stored in
~/.config/newsclawd/config.json
:
json
{
  "alerts": [
    {
      "type": "twitter",
      "account": "@notabanker1",
      "keywords": ["crypto", "AI"],
      "enabled": true
    },
    {
      "type": "crypto",
      "symbol": "BTCUSDT",
      "above": 70000,
      "below": 60000
    }
  ],
  "notifications": {
    "telegram": true,
    "discord": false,
    "email": false
  }
}
配置存储在
~/.config/newsclawd/config.json
json
{
  "alerts": [
    {
      "type": "twitter",
      "account": "@notabanker1",
      "keywords": ["crypto", "AI"],
      "enabled": true
    },
    {
      "type": "crypto",
      "symbol": "BTCUSDT",
      "above": 70000,
      "below": 60000
    }
  ],
  "notifications": {
    "telegram": true,
    "discord": false,
    "email": false
  }
}

3. Cron Integration

3. Cron集成

Set up automated checks:
bash
undefined
设置自动化检查任务:
bash
undefined

Every 5 minutes for crypto

Every 5 minutes for crypto

*/5 * * * * newsclawd check crypto
*/5 * * * * newsclawd check crypto

Every hour for news

Every hour for news

0 * * * * newsclawd check rss
0 * * * * newsclawd check rss

Every 15 min for Twitter

Every 15 min for Twitter

*/15 * * * * newsclawd check twitter

Use `openclaw cron add` to schedule these.
*/15 * * * * newsclawd check twitter

使用`openclaw cron add`来调度这些任务。

Alert Types

警报类型

Twitter/X Alerts

Twitter/X 警报

  • New tweets from followed accounts
  • Keyword mentions in home timeline
  • Trending topics in specific areas
  • Reply/mention notifications
  • 关注账号发布的新推文
  • 首页时间线中的关键词提及
  • 特定地区的热门话题
  • 回复/提及通知

Crypto Alerts

加密货币警报

  • Price above/below thresholds
  • 24h change percentage
  • Volume spikes
  • New listings
  • 价格高于/低于设定阈值
  • 24小时涨跌幅
  • 交易量激增
  • 新币上线

RSS/Web Alerts

RSS/网页警报

  • New articles matching keywords
  • Website content changes
  • Price/product availability
  • API status changes
  • 匹配关键词的新文章
  • 网站内容变更
  • 价格/商品库存变动
  • API状态变更

Scripts Reference

脚本参考

ScriptPurpose
monitor.py
Main monitoring daemon
twitter.py
X/Twitter checks (requires bird CLI)
crypto.py
Binance price checks
rss.py
RSS feed parsing
web.py
Website change detection
notify.py
Send alerts via configured channels
脚本用途
monitor.py
主监控守护进程
twitter.py
X/Twitter内容检查(需要bird CLI)
crypto.py
Binance价格检查
rss.py
RSS源解析
web.py
网站内容变更检测
notify.py
通过配置的渠道发送警报

Usage Examples

使用示例

Example 1: Crypto Price Alert

示例1:加密货币价格警报

bash
undefined
bash
undefined

User: "Alert me if BTC drops below 60k or goes above 70k"

User: "Alert me if BTC drops below 60k or goes above 70k"

python3 scripts/crypto.py --symbol BTCUSDT --below 60000 --above 70000
undefined
python3 scripts/crypto.py --symbol BTCUSDT --below 60000 --above 70000
undefined

Example 2: Twitter Account Monitor

示例2:Twitter账号监控

bash
undefined
bash
undefined

User: "Watch @matrixdotorg for any matrix updates"

User: "Watch @matrixdotorg for any matrix updates"

python3 scripts/twitter.py --account @matrixdotorg --keywords "update,release,security"
undefined
python3 scripts/twitter.py --account @matrixdotorg --keywords "update,release,security"
undefined

Example 3: News RSS Monitor

示例3:新闻RSS监控

bash
undefined
bash
undefined

User: "Keep me updated on AI news from TechCrunch"

User: "Keep me updated on AI news from TechCrunch"

python3 scripts/rss.py --url https://techcrunch.com/category/artificial-intelligence/feed/ --keywords "AI,LLM,OpenAI"
undefined
python3 scripts/rss.py --url https://techcrunch.com/category/artificial-intelligence/feed/ --keywords "AI,LLM,OpenAI"
undefined

Example 4: Website Change Detection

示例4:网站变更检测

bash
undefined
bash
undefined

User: "Tell me when the price on this product page changes"

User: "Tell me when the price on this product page changes"

python3 scripts/web.py --url "https://store.example.com/product/123" --selector ".price-amount" --interval 1h
undefined
python3 scripts/web.py --url "https://store.example.com/product/123" --selector ".price-amount" --interval 1h
undefined

Integration with OpenClaw

与OpenClaw集成

When user requests monitoring:
  1. Parse the request (what, where, thresholds)
  2. Create/update config
  3. Set up cron job if recurring
  4. Confirm with user
  5. Route alerts back to user's preferred channel
Alert format:
🚨 NewsClawd Alert

Type: Crypto Price
Asset: BTCUSDT
Trigger: Above $70,000
Current: $71,245 (+5.2% 24h)

Time: 2026-02-06 14:23 UTC
当用户发起监控请求时:
  1. 解析请求(监控内容、来源、阈值)
  2. 创建/更新配置
  3. 如果是周期性任务则设置cron作业
  4. 向用户确认配置完成
  5. 将警报推送至用户偏好的渠道
警报格式:
🚨 NewsClawd Alert

Type: Crypto Price
Asset: BTCUSDT
Trigger: Above $70,000
Current: $71,245 (+5.2% 24h)

Time: 2026-02-06 14:23 UTC

Dependencies

依赖

  • bird
    CLI for X/Twitter (optional)
  • python3-requests
    for HTTP
  • python3-feedparser
    for RSS (optional, can use built-in)
  • Binance API key for crypto (optional, public endpoints work)
  • 用于X/Twitter访问的
    bird
    CLI(可选)
  • 用于HTTP请求的
    python3-requests
  • 用于RSS解析的
    python3-feedparser
    (可选,可使用内置功能)
  • 加密货币功能所需的Binance API密钥(可选,公共接口也可使用)

Security Notes

安全注意事项

  • Store API keys in
    ~/.config/newsclawd/.env
    (gitignored)
  • Rotate Twitter cookies regularly
  • Use read-only API keys where possible
  • Rate limit all checks to avoid bans
  • 将API密钥存储在
    ~/.config/newsclawd/.env
    中(已加入gitignore)
  • 定期轮换Twitter cookies
  • 尽可能使用只读API密钥
  • 对所有检查请求设置速率限制,避免被封禁