Feed Watcher
Monitor RSS/Atom feeds and send notifications when new content appears.
Description
This skill monitors RSS and Atom feeds for new content and sends notifications via webhook or cron job. It's designed to track YouTube channels, Reddit subreddits, GitHub repos, blogs, and any other RSS/Atom feed.
Features
- - Add multiple feeds to monitor
- Track new articles/posts since last check
- Configurable notification via webhook
- Persistent state (remembers last checked item)
- Supports any RSS/Atom feed
Installation
CODEBLOCK0
Configuration
Create a .env file with:
CODEBLOCK1
Commands
Add a feed
CODEBLOCK2
Example - YouTube channel:
CODEBLOCK3
Example - Reddit subreddit:
CODEBLOCK4
Example - GitHub releases:
CODEBLOCK5
List feeds
CODEBLOCK6
Scan for updates
CODEBLOCK7
Check specific feed
CODEBLOCK8
Remove feed
CODEBLOCK9
Usage as a Cron Job
Add to crontab for automatic monitoring:
CODEBLOCK10
Supported Feed Types
- - RSS 2.0
- Atom 1.0
- YouTube channel feeds
- Reddit subreddit feeds (.rss)
- GitHub release/issue feeds
- Any standard RSS/Atom feed
Examples
YouTube Channel
Find channel ID, then use:
CODEBLOCK11
Reddit
For r/programming:
CODEBLOCK12
GitHub Releases
For a repo:
CODEBLOCK13
Environment Variables
| Variable | Required | Description |
|---|
| WEBHOOKURL | No | URL to send notifications |
| DATADIR |
No | Directory for state files (default: ~/.feed-watcher) |
Notification Format
When new content is found, the webhook receives:
CODEBLOCK14
Notes
- - State is stored in INLINECODE1
- Each feed tracks its own last-seen item
- Run
scan before setting up cron to test feeds - You can use with any notification service (Discord webhook, Telegram bot, Slack, etc.)
Feed Watcher
监控RSS/Atom源,并在新内容出现时发送通知。
描述
该技能用于监控RSS和Atom源的新内容,并通过Webhook或定时任务发送通知。它设计用于追踪YouTube频道、Reddit子版块、GitHub仓库、博客以及任何其他RSS/Atom源。
功能
- - 添加多个监控源
- 追踪自上次检查以来的新文章/帖子
- 通过Webhook进行可配置的通知
- 持久化状态(记住上次检查的项目)
- 支持任何RSS/Atom源
安装
bash
安装所需依赖
npm install
或全局安装
npm install -g rss-parser dotenv
配置
创建包含以下内容的.env文件:
env
通知的Webhook URL(Discord、Telegram、Slack等)
WEBHOOK_URL=https://your-webhook-url.com/hook
可选:自定义用户代理
USER_AGENT=feed-watcher/1.0
命令
添加源
bash
node index.js add 源名称 https://example.com/feed.xml
示例 - YouTube频道:
bash
node index.js add Psychopoly https://www.youtube.com/feeds/videos.xml?channel_id=UCXXXX
示例 - Reddit子版块:
bash
node index.js add programming https://www.reddit.com/r/programming/.rss
示例 - GitHub发布:
bash
node index.js add openclaw https://github.com/openclaw/openclaw/releases.atom
列出源
bash
node index.js list
扫描更新
bash
node index.js scan
检查特定源
bash
node index.js check 源名称
删除源
bash
node index.js remove 源名称
作为定时任务使用
添加到crontab以实现自动监控:
bash
每30分钟运行一次
/30 * cd /path/to/feed-watcher && node index.js scan >> /var/log/feed-watcher.log 2>&1
支持的源类型
- - RSS 2.0
- Atom 1.0
- YouTube频道源
- Reddit子版块源(.rss)
- GitHub发布/问题源
- 任何标准RSS/Atom源
示例
YouTube频道
找到频道ID,然后使用:
https://www.youtube.com/feeds/videos.xml?channel_id=UCxxxxx
Reddit
对于r/programming:
https://www.reddit.com/r/programming/.rss
GitHub发布
对于仓库:
https://github.com/owner/repo/releases.atom
环境变量
| 变量 | 必需 | 描述 |
|---|
| WEBHOOKURL | 否 | 发送通知的URL |
| DATADIR |
否 | 状态文件目录(默认:~/.feed-watcher) |
通知格式
当发现新内容时,Webhook接收:
json
{
feed: 源名称,
count: 3,
items: [
{
title: 文章标题,
link: https://example.com/article,
pubDate: 2024-01-15T10:30:00Z
}
]
}
注意事项
- - 状态存储在~/.feed-watcher/feeds.json
- 每个源追踪自己的最后查看项目
- 在设置定时任务前运行scan以测试源
- 可与任何通知服务配合使用(Discord Webhook、Telegram机器人、Slack等)