How jiegaosunny/github-trending-widget works
GitHub Trending Widget fetches repository data through a Cloudflare Worker, then presents a rotating, hourly refreshed view in Scriptable. The Worker checks its edge cache; on a miss or expiry, it scrapes and parses GitHub Trending, generates Chinese summaries with Workers AI, and caches the result. The widget displays six of the top twelve repositories per page, with rank, star counts, descriptions, and a link to GitHub Trending. The graph reflects the sampled source and README; no unsampled implementation is assumed.
Main entry points: index.js HTTP Handler · GitHub Trending.js Scriptable Widget
Components 9
iOS Widget
- Scriptable Widget
scriptable/GitHub Trending.js
Worker Backend
- HTTP Handler
worker/index.js - Trending Fetcher
worker/index.js - HTML Parser
worker/index.js - Summary Generator
worker/index.js
Edge Storage
- Trending Cache
worker/index.js
Other components
- Widget User
- GitHub Trending
- Workers AI
Connections 11
- Widget User → Scriptable Widget: opens
README.md - Scriptable Widget → HTTP Handler: fetches JSON
scriptable/GitHub Trending.js - HTTP Handler → Trending Cache: reads cache
worker/index.js - HTTP Handler → Trending Fetcher: fetches on miss
worker/index.js - Trending Fetcher → GitHub Trending: scrapes page
worker/index.js - Trending Fetcher → HTML Parser: parses HTML
worker/index.js - HTTP Handler → Summary Generator: adds summaries
worker/index.js - Summary Generator → Workers AI: generates text
worker/index.js - HTTP Handler → Trending Cache: writes results
worker/index.js - HTTP Handler → Scriptable Widget: returns JSON
worker/index.js - Scriptable Widget → GitHub Trending: opens trending
scriptable/GitHub Trending.js