πŸ“¦ liuzhch1 / hacker-news-cn

Hacker News δΈ­ζ–‡ AI ηΏ»θ―‘

β˜… 0 stars β‘‚ 0 forks πŸ‘ 0 watching
πŸ“₯ Clone https://github.com/liuzhch1/hacker-news-cn.git
HTTPS git clone https://github.com/liuzhch1/hacker-news-cn.git
SSH git clone git@github.com:liuzhch1/hacker-news-cn.git
CLI gh repo clone liuzhch1/hacker-news-cn
liuzhch1 liuzhch1 feat: hide read button 44d36c3 10 months ago πŸ“ History
πŸ“‚ main View all commits β†’
πŸ“ .github
πŸ“ public
πŸ“ src
πŸ“„ .gitignore
πŸ“„ .python-version
πŸ“„ package.json
πŸ“„ pnpm-lock.yaml
πŸ“„ pyproject.toml
πŸ“„ README.md
πŸ“„ tsconfig.json
πŸ“„ uv.lock
πŸ“„ README.md

Hacker News δΈ­ζ–‡ AI ηΏ»θ―‘

Hacker News ζ–‡η«  AI ηΏ»θ―‘ε·₯ε…·οΌŒε°†θ‹±ζ–‡ζ–‡η« θ‡ͺεŠ¨ηΏ»θ―‘ζˆδΈ­ζ–‡εΉΆη”Ÿζˆ HTML 鑡青。

全部使用 Cursor AI ηΌ–ε†™οΌŒjust some code only written once.

Dev

export GOOGLE_API_KEY=<your-api-key>
uv run src/main.py
pnpm start ./hn_stories.json ./output && npx serve output

Generate Weekly Pages

To generate HTML pages for all weekly archives stored in R2:

# Process new articles and generate all weekly pages
pnpm start ./hn_stories.json ./output --all-weeks

# Only generate all weekly pages without processing new articles
pnpm generate-all-weeks ./output

This will:

  • Pull all weekly JSON files from R2 storage
  • Generate HTML pages for each week
  • Update the history index page with links to all weeks