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(Minimax 默认OPENAI_API_KEY)MiniMax-M2.1-lightning - 图片上传(可选):或
~/.r2-upload.ymlR2_UPLOAD_CONFIG - 网络可访问新闻源与图片
- 可选性能参数:(默认 4)、
FETCH_WORKERS(默认 3)TRANSLATE_WORKERS
- Python 3.8+ ()
python3 - Translation API: or
MINIMAX_API_KEY(Minimax defaults toOPENAI_API_KEY)MiniMax-M2.1-lightning - Image upload (optional): or
~/.r2-upload.ymlR2_UPLOAD_CONFIG - Network access to news sources and images
- Optional performance parameters: (default 4),
FETCH_WORKERS(default 3)TRANSLATE_WORKERS
推荐流程
Recommended Workflow
- 确认日期、来源、数量、是否需要图片与输出路径。
- 运行 。
python3 scripts/generate.py ... - 复查标题翻译、摘要质量、重复项与图片链接。
- 如图片失败,可用 重新生成或用
--no-images补图。scripts/process_images.py
- Confirm date, sources, count, whether images are needed, and output path.
- Run .
python3 scripts/generate.py ... - Review title translations, summary quality, duplicates, and image links.
- If image processing fails, regenerate with or use
--no-imagesto add missing images.scripts/process_images.py
快速使用
Quick Start
bash
python3 scripts/generate.py --date $(date +%F) --save ./news.mdbash
python3 scripts/generate.py --date $(date +%F) --save ./news.md常用参数
Common Parameters
- : 指定新闻源(默认:hackernews reddit-programming github-trending devto lobsters paperswithcode huggingface arxiv-ai)
--sources <list> - : 每源抓取数量(默认:15)
--count <n> - : 最终精选数量(默认:10)
--limit <n> - : 处理图片上限(默认:10)
--max-images <n> - : 禁用图片处理
--no-images - : 仅输出Markdown
--output-only
- : Specify news sources (default: hackernews reddit-programming github-trending devto lobsters paperswithcode huggingface arxiv-ai)
--sources <list> - : Number of items to scrape per source (default: 15)
--count <n> - : Final curated count (default: 10)
--limit <n> - : Maximum number of images to process (default: 10)
--max-images <n> - : Disable image processing
--no-images - : Output only Markdown
--output-only
分类规则
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
undefinedAdopt 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 篇
- 文章标题一
- 文章标题二 ...
AI与机器学习:3 篇
- 文章标题一
- 文章标题二 ...
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.mdreferences/SOURCES.mdreferences/EXAMPLES.md
references/WORKFLOW.mdreferences/SOURCES.mdreferences/EXAMPLES.md