ai-news-digest

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
<!-- i18n-examples:start -->
<!-- i18n-examples:start -->

调用 / Invoke / 呼び出し

Invoke / 调用 / 呼び出し

中文

Chinese

  • "用 ai-news-digest 生成今天的 AI 资讯简报"
  • "用 ai-news-digest 获取昨天的 AI 新闻"
  • "用 ai-news-digest 看看前天有什么 AI 动态"
  • "帮我用 ai-news-digest 整理一下最近的 AI 资讯"
  • "用 ai-news-digest 生成今天的 AI 资讯简报"
  • "用 ai-news-digest 获取昨天的 AI 新闻"
  • "用 ai-news-digest 看看前天有什么 AI 动态"
  • "帮我用 ai-news-digest 整理一下最近的 AI 资讯"

English

English

  • "Use ai-news-digest to generate today's AI news digest"
  • "Use ai-news-digest to get yesterday's AI news in English"
  • "Generate an AI news summary for 2026-01-20 using ai-news-digest"
  • "Use ai-news-digest to summarize recent AI developments"
  • "Use ai-news-digest to generate today's AI news digest"
  • "Use ai-news-digest to get yesterday's AI news in English"
  • "Generate an AI news summary for 2026-01-20 using ai-news-digest"
  • "Use ai-news-digest to summarize recent AI developments"

日本語

Japanese

  • "ai-news-digest で今日のAIニュース要約を日本語で作成して"
  • "ai-news-digest で昨日のAIニュースを取得して"
  • "ai-news-digest を使って最近のAI動向をまとめて"
  • "ai-news-digest で一昨日のAI関連ニュースを教えて"
<!-- i18n-examples:end -->
  • "ai-news-digest で今日のAIニュース要約を日本語で作成して"
  • "ai-news-digest で昨日のAIニュースを取得して"
  • "ai-news-digest を使って最近のAI動向をまとめて"
  • "ai-news-digest で一昨日のAI関連ニュースを教えて"
<!-- i18n-examples:end -->

目标

Objectives

在指定时间窗口内,从一组 AI 资讯信源获取最新内容并产出“可验收”的资讯简报:
  • 交付物:1 份 Markdown 简报(可选同时给 JSON 数据)
  • 每条资讯:标题、时间、来源、链接、1-3 句摘要、标签(可选“为什么重要”)
  • 默认策略:RSS/Atom 优先,HTML 兜底;不绕过付费墙
  • 默认输出:中文(如来源为英文,需翻译为中文再输出)
Within the specified time window, retrieve the latest content from a set of AI news sources and produce a "deliverable-ready" news digest:
  • Deliverables: 1 Markdown digest (JSON data optional)
  • Each news item: Title, time, source, link, 1-3 sentence summary, tags (optional "why it's important")
  • Default strategy: RSS/Atom first, HTML fallback; do not bypass paywalls
  • Default output: Chinese (if source is in English, translate to Chinese before output)

输入(先问清)

Inputs (Clarify First)

  • 时间窗口(默认“当天”):
    • 自然语言:
      今天/昨天/前天
      (可扩展
      过去7天/最近24小时
    • 指定日期:
      YYYY-MM-DD
      (按用户时区解释为“当天 00:00-23:59:59”)
    • 具体起止时间:
      since/until
      (含时区)
  • 时区:默认
    UTC+8
    (建议实现默认
    Asia/Shanghai
    ),用户可显式指定
  • 输出语言:默认
    zh
    (中文);可选
    en
    /
    both
  • 主题范围:研究/产品/开源/投融资/政策(可多选)
  • 信源范围:使用默认列表或用户指定子集(见
    references/sources.md
  • 输出格式:Markdown(默认)/ JSON / 两者
  • 篇数上限:总数与每个主题上限(默认总 20)
  • 处理深度:仅标题摘要(默认)/ 尝试正文提取(对非付费内容)
  • Time window (default "today"):
    • Natural language:
      今天/昨天/前天
      (extendable to
      过去7天/最近24 hours
      )
    • Specified date:
      YYYY-MM-DD
      (interpreted as "00:00-23:59:59 on that day" in the user's time zone)
    • Specific start/end time:
      since/until
      (with time zone)
  • Time zone: Default
    UTC+8
    (recommended to implement default
    Asia/Shanghai
    ), users can explicitly specify
  • Output language: Default
    zh
    (Chinese); optional
    en
    /
    both
  • Topic scope: Research/Product/Open Source/Investment & Financing/Policy (multiple selection allowed)
  • Source scope: Use default list or user-specified subset (see
    references/sources.md
    )
  • Output format: Markdown (default) / JSON / both
  • Maximum number of items: Total limit and per-topic limit (default total 20)
  • Processing depth: Title only with summary (default) / attempt full text extraction (for non-paywalled content)

流程(推荐架构)

Workflow (Recommended Architecture)

  1. 载入信源清单(RSS 优先;无法 RSS 的再做 HTML 适配)
  2. 拉取条目并标准化(标题/链接/发布时间/摘要/来源)
  3. 去重与合并(同链接/同标题近似/跨源重复)
  4. 主题分类与排序(时间 + 信源权重 + 关键词)
  5. 生成简报(套用模板
    assets/digest-template.md
    ,附来源链接)
  6. 质检(时间窗口命中、无重复、每条都有链接/来源)
  1. Load source list (RSS first; adapt HTML if RSS is unavailable)
  2. Fetch and standardize items (title/link/publish time/summary/source)
  3. Deduplication and merging (same link/similar title/cross-source duplicates)
  4. Topic classification and sorting (time + source weight + keywords)
  5. Generate digest (apply template
    assets/digest-template.md
    , attach source links)
  6. Quality check (time window hit, no duplicates, each item has link/source)

护栏(合规与稳定性)

Guardrails (Compliance & Stability)

  • 不绕过付费墙/登录限制;付费内容仅使用公开标题/摘要/元信息
  • 尊重站点条款与 robots;必要时降级为“只收 RSS 条目”
  • 失败可降级:只输出“可获取”的部分并列出失败信源清单与原因
  • 翻译/摘要必须保留可追溯性:输出中始终保留原始链接与来源;必要时在 JSON 保留原文
    title_raw/summary_raw
  • 任何写文件/覆盖导出前先确认输出路径与是否覆盖
  • Do not bypass paywalls/login restrictions; only use public title/summary/meta info for paywalled content
  • Respect site terms and robots.txt; downgrade to "only fetch RSS items" if necessary
  • Degradable on failure: Only output the "retrievable" part and list failed sources with reasons
  • Translation/summary must retain traceability: Always keep original link and source in output; retain original
    title_raw/summary_raw
    in JSON if necessary
  • Confirm output path and overwrite permission before any file writing/overwriting export

如何运行

How to Run

CLI 命令

CLI Commands

bash
undefined
bash
undefined

进入脚本目录

Enter script directory

cd skills/public/ai-news-digest/scripts
cd skills/public/ai-news-digest/scripts

获取今天的资讯摘要

Get today's news digest

python run.py --day 今天
python run.py --day 今天

获取昨天的资讯

Get yesterday's news

python run.py --day yesterday
python run.py --day yesterday

如遇本地 SSL 证书链问题(不推荐),可禁用校验

Disable SSL certificate verification if encountering local SSL certificate chain issues (not recommended)

python run.py --day yesterday --insecure
python run.py --day yesterday --insecure

指定日期

Specify date

python run.py --day 2026-01-15
python run.py --day 2026-01-15

输出 JSON 格式

Output in JSON format

python run.py --day 今天 --format json
python run.py --day 今天 --format json

输出分享图片(需安装 Pillow)

Export as image (Pillow required)

python run.py --day 今天 --format image
python run.py --day 今天 --format image

输出横版图片(适合公众号)

Export as landscape image (suitable for official accounts)

python run.py --day 今天 --format image --image-preset landscape
python run.py --day 今天 --format image --image-preset landscape

输出浅色主题图片

Export as light theme image

python run.py --day 今天 --format image --image-theme light
python run.py --day 今天 --format image --image-theme light

写入文件

Write to file

python run.py --day 今天 --out digest.md
python run.py --day 今天 --out digest.md

使用 LLM 翻译(需配置 API key)

Use LLM for translation (API key required)

python run.py --day 今天 --llm
python run.py --day 今天 --llm

详细输出

Detailed output

python run.py --day 今天 --verbose
python run.py --day 今天 --verbose

运行冒烟测试

Run smoke test

python run.py --test
undefined
python run.py --test
undefined

CLI 参数

CLI Parameters

参数说明默认值
--day, -d
日期(今天/昨天/前天/YYYY-MM-DD)今天
--since
起始时间(ISO 8601)-
--until
结束时间(ISO 8601)-
--tz
时区Asia/Shanghai
--lang, -l
输出语言(zh/en)zh
--format, -f
输出格式(markdown/json/image)markdown
--image-preset
图片尺寸(portrait/landscape/square)portrait
--image-theme
图片主题(dark/light)dark
--out, -o
输出文件路径-
--topics, -t
主题过滤(逗号分隔)全部
--sources, -s
信源过滤(ID,逗号分隔)全部
--max
最大条数20
--max-per-topic
每主题最大条数5
--llm
使用 LLM 翻译
--verbose, -v
详细输出
--insecure
禁用 SSL 证书校验(不推荐)
ParameterDescriptionDefault Value
--day, -d
Date (today/yesterday/the day before yesterday/YYYY-MM-DD)today
--since
Start time (ISO 8601)-
--until
End time (ISO 8601)-
--tz
Time zoneAsia/Shanghai
--lang, -l
Output language (zh/en)zh
--format, -f
Output format (markdown/json/image)markdown
--image-preset
Image size (portrait/landscape/square)portrait
--image-theme
Image theme (dark/light)dark
--out, -o
Output file path-
--topics, -t
Topic filter (comma-separated)All
--sources, -s
Source filter (IDs, comma-separated)All
--max
Maximum number of items20
--max-per-topic
Maximum items per topic5
--llm
Use LLM for translationNo
--verbose, -v
Detailed outputNo
--insecure
Disable SSL certificate verification (not recommended)No

脚本模块说明

Script Module Description

脚本功能
run.py
CLI 入口,整合所有模块
time_window.py
时间窗口解析
fetch_feeds.py
Feed 抓取(缓存/限速/重试)
parse_feeds.py
RSS/Atom 解析与规范化
dedupe.py
去重与多信源合并
classify_rank.py
主题分类与排序
render_digest.py
Markdown/JSON 渲染
render_image.py
图片渲染(社交分享卡片)
summarize_llm.py
LLM 翻译(可选)
ScriptFunction
run.py
CLI entry point, integrates all modules
time_window.py
Time window parsing
fetch_feeds.py
Feed fetching (caching/rate limiting/retry)
parse_feeds.py
RSS/Atom parsing and standardization
dedupe.py
Deduplication and cross-source merging
classify_rank.py
Topic classification and sorting
render_digest.py
Markdown/JSON rendering
render_image.py
Image rendering (social sharing cards)
summarize_llm.py
LLM-based translation (optional)

依赖

Dependencies

必需(Python 标准库):
  • Python 3.10+
  • 无第三方依赖即可运行 Markdown/JSON 输出
可选(增强功能):
  • Pillow
    : 图片渲染功能(
    --format image
  • pyyaml
    : 更完整的 YAML 解析(脚本内置简化解析器,无需安装也能正常加载
    sources.yaml
  • anthropic
    openai
    : LLM 翻译功能
Required (Python Standard Library):
  • Python 3.10+
  • No third-party dependencies required for Markdown/JSON output
Optional (Enhanced Features):
  • Pillow
    : Image rendering functionality (
    --format image
    )
  • pyyaml
    : More complete YAML parsing (the script has a built-in simplified parser, so
    sources.yaml
    can be loaded normally without installation)
  • anthropic
    or
    openai
    : LLM translation functionality

安装可选依赖

Install Optional Dependencies

bash
undefined
bash
undefined

安装图片渲染支持

Install image rendering support

pip install Pillow
pip install Pillow

安装所有可选依赖

Install all optional dependencies

pip install Pillow pyyaml anthropic

> **注意**:
> - 未安装 Pillow 时,Markdown 和 JSON 输出正常工作,仅图片输出不可用
> - 未安装 pyyaml 时,脚本会使用内置的简化 YAML 解析器,可正常加载完整信源列表
pip install Pillow pyyaml anthropic

> **Note**:
> - If Pillow is not installed, Markdown and JSON output work normally, only image output is unavailable
> - If pyyaml is not installed, the script uses the built-in simplified YAML parser, and the complete source list can be loaded normally

资源

Resources

  • 数据模型与输出规范:
    references/output-spec.md
  • 信源注册表:
    references/sources.yaml
  • 信源评估说明:
    references/sources.md
  • 时间窗口规范:
    references/time-window.md
  • 主题关键词:
    references/topic-keywords.md
  • 翻译规范:
    references/translation.md
  • Markdown 模板:
    assets/digest-template.md
  • LLM 提示词:
    assets/summarize-prompt.md
  • Data model and output specification:
    references/output-spec.md
  • Source registry:
    references/sources.yaml
  • Source evaluation description:
    references/sources.md
  • Time window specification:
    references/time-window.md
  • Topic keywords:
    references/topic-keywords.md
  • Translation specification:
    references/translation.md
  • Markdown template:
    assets/digest-template.md
  • LLM prompt:
    assets/summarize-prompt.md