How emanuel36/trending-repos-site works
This is a daily trending-repository publishing job: its CLI starts the run coordinator, which filters previously seen repositories, gathers two rankings, enriches candidates, queues them, summarizes them with Gemini, then saves and renders daily pages and the history index. The README also documents a systemd schedule and password-protected HTTPS serving. The sampled source supports the job’s internal calls; deployment and serving relationships below rely on README statements rather than inspected deployment-file contents.
Main entry points: run.py Run coordinator · render.py HTML renderer · __main__.py CLI entry · gemini.py Gemini client
Components 20
Job control
- CLI entry
trending_site/__main__.py - Run coordinator
trending_site/run.py
Repository discovery
- Trendshift ranking
trending_site/sources.py - GitHub Trending
trending_site/sources.py - Repo enrichment
trending_site/sources.py - Trendshift
- GitHub API
Summary generation
- Gemini client
trending_site/gemini.py - Summary format
trending_site/summary.py - Gemini API
State and publication
- Run state
trending_site/state.py - Atomic writes
trending_site/files.py - HTML renderer
trending_site/render.py - Page template
trending_site/assets/page.html
Scheduled hosting
- Daily timer
deploy/trending-site.timer - Job service
deploy/trending-site.service - Published pages
- HTTPS and login
deploy/Caddyfile
Other components
- Operator
- Site visitor
Connections 22
- Operator → CLI entry: starts job
README.md - Daily timer → Job service: triggers daily
README.md - Job service → CLI entry: runs command
README.md - CLI entry → Run coordinator: starts run
trending_site/__main__.py - CLI entry → Gemini client: configures client
trending_site/__main__.py - Run coordinator → Trendshift ranking: fetches ranking
trending_site/run.py - Run coordinator → GitHub Trending: fetches ranking
trending_site/run.py - Trendshift ranking → Trendshift: reads ranking
trending_site/sources.py - GitHub Trending → GitHub API: reads ranking
trending_site/sources.py - Run coordinator → Repo enrichment: enriches repos
trending_site/run.py - Repo enrichment → GitHub API: reads repo data
trending_site/sources.py - Run coordinator → Run state: loads and saves
trending_site/run.py - Run coordinator → Gemini client: requests summaries
trending_site/run.py - Gemini client → Summary format: builds and validates
trending_site/gemini.py - Gemini client → Gemini API: posts requests
trending_site/gemini.py - Run coordinator → HTML renderer: renders pages
trending_site/run.py - HTML renderer → Page template: fills template
trending_site/render.py - Run state → Atomic writes: writes state
trending_site/state.py - HTML renderer → Atomic writes: writes HTML
trending_site/render.py - HTML renderer → Published pages: publishes files
README.md - HTTPS and login → Published pages: serves protected pages
README.md - Site visitor → HTTPS and login: visits site
README.md