Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HN 中文日报 → Discord

每 6 小时自动抓取 Hacker News 热门故事,通过 Claude 筛选并生成中文摘要,推送到 Discord 频道。

架构

GitHub Actions (定时触发)
  └─ npm run run-once
       ├─ HN 抓取 (Algolia API)
       ├─ Claude 筛选 + 中文摘要
       └─ Discord Webhook 推送
  • 无数据库、无 Docker、无 VPS
  • 不做去重(6h 间隔,少量重复可接受)
  • 纯 GitHub Actions 运行

设置

1. 配置 GitHub Secrets

在仓库 Settings → Secrets and variables → Actions 中添加:

Secret 说明
ANTHROPIC_API_KEY Anthropic API 密钥
DISCORD_WEBHOOK_URL Discord 频道 Webhook URL

2. 获取 Discord Webhook

  1. 打开 Discord 频道设置
  2. 集成 → Webhook → 新建 Webhook
  3. 复制 Webhook URL

3. 启用 GitHub Actions

推送代码后,Actions 会自动按 cron 运行。也可以在 Actions 页面手动触发。

本地运行

export ANTHROPIC_API_KEY="your-key"
export DISCORD_WEBHOOK_URL="your-webhook-url"
npm install
npm run run-once

工作流程

  1. 抓取: 通过 Algolia API 获取最近 6 小时内 ≥50 分的 HN 故事
  2. 筛选: Claude 过滤掉非科技内容,选出最多 15 条最有价值的故事
  3. 摘要: 为每条故事生成中文标题和 1-2 句摘要
  4. 推送: 格式化为 Discord Embed 发送到指定频道

About

No description, website, or topics provided.

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages