自动抓取 Hacker News 热门博客的 RSS 更新,并生成中文翻译摘要。
- 每天自动抓取 100+ 个技术博客的最新文章
- 自动翻译标题为中文
- 生成 Markdown 格式的每日摘要
- 通过 GitHub Actions 自动运行
cd rss-digest
git init
git add .
git commit -m "Initial commit"
gh repo create rss-digest --public --source=. --remote=origin --push- 访问 https://aistudio.google.com/app/apikey
- 创建新的 API Key
- 在 GitHub 仓库设置中添加 Secret:
- 进入仓库 Settings → Secrets and variables → Actions
- 点击 "New repository secret"
- Name:
GEMINI_API_KEY - Value: 你的 API Key
或者使用 Anthropic Claude:
- 访问 https://console.anthropic.com/settings/keys
- 创建 API Key
- 添加 Secret:
ANTHROPIC_API_KEY - 修改 workflow 中的
AI_PROVIDER: anthropic
- 进入仓库的 Actions 标签
- 启用 workflows
- 可以手动触发 "Run workflow" 测试
使用 Gemini (推荐 - 免费):
cd rss-digest
pip install -r requirements.txt
export GEMINI_API_KEY='your-api-key'
export AI_PROVIDER='gemini'
python fetch_feeds.py使用 Claude:
export ANTHROPIC_API_KEY='your-api-key'
export AI_PROVIDER='anthropic'
python fetch_feeds.py编辑 .github/workflows/daily-digest.yml 中的 cron 表达式:
schedule:
- cron: '0 12 * * *' # UTC 时间在 fetch_feeds.py 中修改 hours 参数:
updates = fetch_recent_articles(feeds, hours=48) # 改为 48 小时每天生成的摘要会自动提交到仓库,文件名格式:digest-YYYY-MM-DD.md
使用 HN Popularity Contest 2025 的结果。