RSS Daily Digest
Generate a structured daily news digest from configured RSS feeds.
Prerequisites
- - Python 3 with
feedparser and datetime modules - Feed sources configured in INLINECODE2
- Output directory: INLINECODE3
Workflow
When the user asks for a daily digest or RSS summary:
- 1. Read feed sources: Read the file INLINECODE4
to get the list of RSS feed URLs and their categories.
- 2. Fetch and parse feeds: For each feed URL, run:
python3 {baseDir}/scripts/fetch_feeds.py \
--feeds-file {baseDir}/references/feed-sources.md --hours 24
This outputs a JSON array of articles published in the last 24 hours.
- 3. Summarize articles: For each article in the JSON output:
- Read the title and description
- Generate a one-sentence summary (max 30 words) in the same language
as the article
- Assign a relevance score (1-5) based on the user's interests if known
- 4. Format the digest: Run:
python3 {baseDir}/scripts/format_digest.py \
--input /tmp/openclaw-rss-articles.json \
--template {baseDir}/assets/digest-template.md
This produces the final Markdown report.
- 5. Save the report:
- Create directory if needed:
mkdir -p ~/openclaw-output/digests/
- Save as:
~/openclaw-output/digests/digest-YYYY-MM-DD.md
- Use today's date for the filename
- 6. Report to user: Confirm completion with:
- Total number of articles found
- Number per category
- File path of the saved digest
- Offer to send to a messaging channel if configured
Error Handling
- - If a feed URL returns HTTP error or times out (>10s), skip it and note
in output
- - If
feedparser is not installed, run: INLINECODE8 - If zero articles found in 24h window, inform user and suggest expanding
timeframe
- - Never silently fail — always report which feeds succeeded and which failed
Output Format
Use this structure for the digest:
Daily Digest — {DATE}
{TOTALCOUNT} articles from {FEEDCOUNT} sources
Tech
Business
World
Generated by RSS Daily Digest Skill at {TIMESTAMP}
Rules
- - Never fabricate article titles or URLs — only use data from actual RSS feeds
- Never modify or summarize in a way that changes the factual content
- If the user specifies a language preference, translate summaries accordingly
- Always preserve the original article URL
- Maximum 50 articles per digest to keep it readable
RSS 每日摘要
从配置的RSS源生成结构化的每日新闻摘要。
前置条件
- - Python 3,需安装 feedparser 和 datetime 模块
- 在 {baseDir}/references/feed-sources.md 中配置好Feed源
- 输出目录:~/openclaw-output/digests/
工作流程
当用户请求每日摘要或RSS汇总时:
- 1. 读取Feed源:读取文件 {baseDir}/references/feed-sources.md
获取RSS Feed URL列表及其分类。
- 2. 获取并解析Feed:对每个Feed URL,运行:
python3 {baseDir}/scripts/fetch_feeds.py \
--feeds-file {baseDir}/references/feed-sources.md --hours 24
这将输出一个JSON数组,包含过去24小时内发布的文章。
- 3. 总结文章:对JSON输出中的每篇文章:
- 读取标题和描述
- 生成一句摘要(最多30词),语言与原文一致
- 根据已知的用户兴趣分配相关性评分(1-5分)
- 4. 格式化摘要:运行:
python3 {baseDir}/scripts/format_digest.py \
--input /tmp/openclaw-rss-articles.json \
--template {baseDir}/assets/digest-template.md
生成最终的Markdown报告。
- 5. 保存报告:
- 按需创建目录:mkdir -p ~/openclaw-output/digests/
- 保存为:~/openclaw-output/digests/digest-YYYY-MM-DD.md
- 文件名使用当天日期
- 6. 向用户报告:确认完成,包含:
- 找到的文章总数
- 每个分类的文章数量
- 已保存摘要的文件路径
- 如果配置了消息渠道,询问是否发送
错误处理
- - 如果Feed URL返回HTTP错误或超时(>10秒),跳过并在输出中注明
- 如果未安装 feedparser,运行:pip3 install feedparser
- 如果24小时内未找到任何文章,告知用户并建议扩大时间范围
- 绝不静默失败——始终报告哪些Feed成功、哪些失败
输出格式
摘要使用以下结构:
每日摘要 — {日期}
来自 {Feed源数量} 个源的 {文章总数} 篇文章
科技
- - 文章标题 — AI生成的一句话摘要。(来源名称)
商业
国际
由RSS每日摘要技能于{时间戳}生成
规则
- - 绝不虚构文章标题或URL——仅使用来自实际RSS Feed的数据
- 绝不修改或总结导致事实内容改变
- 如果用户指定了语言偏好,相应翻译摘要
- 始终保留原始文章URL
- 每份摘要最多50篇文章以保持可读性