- Python 69.8%
- CSS 13.5%
- HTML 11.7%
- Shell 4.2%
- Makefile 0.8%
Root now serves /var/www/broadsheet (not /latest) so the archive index and /YYYYMMDD permalinks resolve; / rewrites to latest. |
||
|---|---|---|
| broadsheet | ||
| deploy | ||
| static | ||
| systemd | ||
| templates | ||
| tests | ||
| .gitignore | ||
| broadsheet.yml | ||
| LICENSE | ||
| Makefile | ||
| PRODUCT.md | ||
| README.md | ||
| requirements-dev.txt | ||
| requirements.txt | ||
The Daily Broadsheet
Yesterday's news, today.
A self-hosted daily newspaper. Every morning, Broadsheet gathers yesterday's news from RSS feeds, the weather from Open-Meteo, market prices, and a wry editorial written by an LLM — then sets it in a classic broadsheet front page as plain static HTML. No app server, no database: just files, served by Caddy.
What you get
- Front page — lead story + top stories from your configured feeds
- Foreign Intelligence / Home News — world & UK sections
- The Weather — yesterday's actuals and today's forecast (Open-Meteo, free, no key, EU-hosted)
- The Markets — FTSE 100, GBP/USD, gold, Bitcoin
- From the Editor's Desk — a daily editorial written via OpenRouter (falls back to a plain summary without a key)
- The Back Page — oddities & curiosities
- Back numbers — every edition archived at
/YYYY-MM-DD/
Quick start
git clone https://codeberg.org/beckingham/broadsheet.git
cd broadsheet
pip install -r requirements.txt
python -m broadsheet # prints editions/YYYY-MM-DD/index.html
python -m http.server -d editions/latest # preview at :8000
Configuration
Everything lives in broadsheet.yml:
| Key | Purpose | Default |
|---|---|---|
paper.name / motto / city |
masthead identity | The Daily Broadsheet |
paper.timezone |
edition dating | Europe/London |
lookback_hours |
how far back "yesterday" reaches | 36 |
location.latitude/longitude |
weather location | Manchester |
feeds[] |
{name, url, section} — section ∈ front, home, world, sport, science, culture, backpage |
BBC, Guardian, Sky |
openrouter.model |
editorial model | google/gemini-2.5-flash-lite |
output_dir |
where editions are printed | editions |
The editorial
The Editor's Desk column is written by an LLM via OpenRouter. Pass the key at runtime — never in the config:
python -m broadsheet --key-url file:///home/you/broadsheet/or.key
Without a key (or if the API fails) you get a plain-text summary column instead — the paper always prints.
Daily printing
deploy/install.sh sets up a systemd user timer (05:30 daily) where
available, falling back to a cron line:
deploy/install.sh ~/broadsheet /var/www/broadsheet
Units live in systemd/, the cron line in deploy/crontab.
Going live at broadsheet.beckingham.dev
- Run
deploy/install.shon the web box - Add
deploy/Caddyfile.broadsheetto/etc/caddy/Caddyfile,systemctl reload caddy - Point
broadsheet.beckingham.devDNS at the box — Caddy handles TLS
Deployment is wired into Beckingham-infra.
Development
pip install -r requirements-dev.txt
make test # pytest
make run # generate today's edition into ./editions
make serve # preview latest edition at :8000
24 tests cover config, news filtering, weather, markets, editorial fallbacks, and the renderer. TDD throughout; PRs welcome.
License
MIT — see LICENSE.