tech-news

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

科技新闻聚合

Tech News Aggregation

从多源抓取热门科技新闻,翻译成中文并生成Markdown汇总,可选上传配图到R2。
Scrape popular tech news from multiple sources, translate to Chinese and generate a Markdown summary, with optional image upload to R2.

使用场景

Use Cases

  • 生成每日科技新闻汇总
  • 需要多源聚合 + 中文摘要
  • 需要带图片的Markdown报告
  • Generate daily tech news summaries
  • Need multi-source aggregation + Chinese summaries
  • Need Markdown reports with images

前置条件

Prerequisites

  • Python 3.8+ (
    python3
    )
  • 翻译API:
    MINIMAX_API_KEY
    OPENAI_API_KEY
    (Minimax 默认
    MiniMax-M2.1-lightning
  • 图片上传(可选):
    ~/.r2-upload.yml
    R2_UPLOAD_CONFIG
  • 网络可访问新闻源与图片
  • 可选性能参数:
    FETCH_WORKERS
    (默认 4)、
    TRANSLATE_WORKERS
    (默认 3)
  • Python 3.8+ (
    python3
    )
  • Translation API:
    MINIMAX_API_KEY
    or
    OPENAI_API_KEY
    (Minimax defaults to
    MiniMax-M2.1-lightning
    )
  • Image upload (optional):
    ~/.r2-upload.yml
    or
    R2_UPLOAD_CONFIG
  • Network access to news sources and images
  • Optional performance parameters:
    FETCH_WORKERS
    (default 4),
    TRANSLATE_WORKERS
    (default 3)

推荐流程

Recommended Workflow

  1. 确认日期、来源、数量、是否需要图片与输出路径。
  2. 运行
    python3 scripts/generate.py ...
  3. 复查标题翻译、摘要质量、重复项与图片链接。
  4. 如图片失败,可用
    --no-images
    重新生成或用
    scripts/process_images.py
    补图。
  1. Confirm date, sources, count, whether images are needed, and output path.
  2. Run
    python3 scripts/generate.py ...
    .
  3. Review title translations, summary quality, duplicates, and image links.
  4. If image processing fails, regenerate with
    --no-images
    or use
    scripts/process_images.py
    to add missing images.

快速使用

Quick Start

bash
python3 scripts/generate.py --date $(date +%F) --save ./news.md
bash
python3 scripts/generate.py --date $(date +%F) --save ./news.md

常用参数

Common Parameters

  • --sources <list>
    : 指定新闻源(默认:hackernews reddit-programming github-trending devto lobsters paperswithcode huggingface arxiv-ai)
  • --count <n>
    : 每源抓取数量(默认:15)
  • --limit <n>
    : 最终精选数量(默认:10)
  • --max-images <n>
    : 处理图片上限(默认:10)
  • --no-images
    : 禁用图片处理
  • --output-only
    : 仅输出Markdown
  • --sources <list>
    : Specify news sources (default: hackernews reddit-programming github-trending devto lobsters paperswithcode huggingface arxiv-ai)
  • --count <n>
    : Number of items to scrape per source (default: 15)
  • --limit <n>
    : Final curated count (default: 10)
  • --max-images <n>
    : Maximum number of images to process (default: 10)
  • --no-images
    : Disable image processing
  • --output-only
    : Output only Markdown

分类规则

Classification Rules

  • AI与机器学习: ai, llm, gpt, claude, model
  • 开发工具与开源: rust, python, github, framework
  • 基础设施与云原生: cloud, aws, kubernetes, docker
  • 产品与设计: product, design, ui, startup
  • 趣闻与观点: 其他
  • AI & Machine Learning: ai, llm, gpt, claude, model
  • Development Tools & Open Source: rust, python, github, framework
  • Infrastructure & Cloud Native: cloud, aws, kubernetes, docker
  • Product & Design: product, design, ui, startup
  • Interesting News & Opinions: Others

输出格式

Output Format

采用固定结构,确保一致性:
markdown
undefined
Adopt a fixed structure to ensure consistency:
markdown
undefined

📰 YYYY-MM-DD 科技早报

📰 YYYY-MM-DD 科技早报

📊 今日导读 精选 10 条科技新闻 来源:Hacker News(4) | GitHub Trending(3) | Lobsters(3)

📊 今日导读 精选 10 条科技新闻 来源:Hacker News(4) | GitHub Trending(3) | Lobsters(3)

📋 文章速览

📋 文章速览

AI与机器学习:3 篇
  1. 文章标题一
  2. 文章标题二 ...

AI与机器学习:3 篇
  1. 文章标题一
  2. 文章标题二 ...

AI 与机器学习

AI 与机器学习

1. 文章中文标题

1. 文章中文标题

📰 Hacker News
<img src="https://r2.example.com/image.jpg" width="100%">
摘要:中文摘要内容...
核心要点: • 要点一 • 要点二 • 要点三


完整模板与示例见 `references/EXAMPLES.md`。
📰 Hacker News
<img src="https://r2.example.com/image.jpg" width="100%">
摘要:中文摘要内容...
核心要点: • 要点一 • 要点二 • 要点三


Complete templates and examples can be found in `references/EXAMPLES.md`.

参考

References

  • references/WORKFLOW.md
  • references/SOURCES.md
  • references/EXAMPLES.md
  • references/WORKFLOW.md
  • references/SOURCES.md
  • references/EXAMPLES.md