Refresh README: TOML config, new channels, ffmpeg, weather toggle
This commit is contained in:
19
README.md
19
README.md
@@ -14,21 +14,28 @@ A Matrix news bot that ingests RSS feeds from curated sources and routes each st
|
||||
- **Paywall detection** — if an article's visible body text is below threshold, Pete swaps in a Wayback Machine snapshot URL for both the lead image and the posted link
|
||||
- **FTS5 search** — full-text search across headlines and ledes
|
||||
- **Image validation** — HEAD-based checks filter tracking pixels, uploads valid images via MXC
|
||||
- **Web UI** — read-only browser interface (Tailwind, Animal-Crossing-ish vibe, day/night palette that follows the visitor's clock) at `/`, `/gaming`, `/tech`, `/politics`. Designed for a `news.parodia.dev`-style deployment
|
||||
- **Video thumbnails** — extracts a frame via `ffmpeg` for video sources; also falls back to `ffmpeg` when Go's stdlib JPEG decoder rejects a source image
|
||||
- **Seasonal weather** — canvas-based ambient overlay (snow, leaves, rain, etc.) driven by a Portugal/Lisbon calendar; visitors can toggle it with the ⭐ star button in the nav
|
||||
- **Web UI** — read-only browser interface (Tailwind, Animal-Crossing-ish vibe, day/night palette that follows the visitor's clock) at `/` plus a section per channel. Designed for a `news.parodia.dev`-style deployment
|
||||
|
||||
## Channels
|
||||
|
||||
| Channel | Purpose |
|
||||
|---|---|
|
||||
| `gaming` | Gaming news, releases, platform announcements |
|
||||
| `tech` | Technology news, product/industry stories |
|
||||
| `politics` | Political, policy, current events |
|
||||
| `gaming` | Gaming news, releases, platform announcements |
|
||||
| `eu` | Portugal and the wider European beat (web-only — does not post to Matrix) |
|
||||
| `music` | Records, scenes, artists |
|
||||
| `anime` | Series, studios, manga |
|
||||
| `foss` | Kernel, distros, free/open source |
|
||||
|
||||
## Requirements
|
||||
|
||||
- Go 1.25+
|
||||
- A Matrix account for Pete with access to target rooms
|
||||
- SQLite (bundled via pure Go driver, no CGo)
|
||||
- `ffmpeg` on `PATH` — used for video-frame thumbnails and as a fallback decoder for JPEGs the Go stdlib rejects
|
||||
- No CGo dependencies — E2EE uses pure Go crypto (goolm) via mautrix v0.28
|
||||
|
||||
## Setup
|
||||
@@ -39,7 +46,7 @@ git clone <repo-url> && cd pete
|
||||
go build -tags goolm .
|
||||
|
||||
# Create config from example
|
||||
cp config.example.yaml config.toml
|
||||
cp config.example.toml config.toml
|
||||
# Edit config.toml — fill in Matrix credentials, room IDs, and a direct_route for every source
|
||||
|
||||
# First run: seed current feed items as seen (prevents flood)
|
||||
@@ -54,7 +61,7 @@ cp config.example.yaml config.toml
|
||||
|
||||
## Configuration
|
||||
|
||||
See `config.example.yaml` for the full structure. Key sections:
|
||||
See `config.example.toml` for the full structure. Key sections:
|
||||
|
||||
- `matrix` — homeserver, credentials, channel room IDs, optional admin room
|
||||
- `posting` — rate limiting (min interval, burst cap, daily cap), optional `round_robin` block
|
||||
@@ -66,7 +73,7 @@ Environment variables can be referenced with `${VAR}` syntax in the TOML.
|
||||
|
||||
### Web UI
|
||||
|
||||
Set `web.enabled: true` (default port `:8080`) to expose Pete's classified-story archive over HTTP. Three sections (`/gaming`, `/tech`, `/politics`) plus a landing page at `/`, all pulling from the `stories` table. Adding a section is two lines in `internal/web/server.go` (the `channels` slice) plus a matching theme color in `internal/web/static/css/input.css`.
|
||||
Set `web.enabled: true` (default port `:8080`) to expose Pete's classified-story archive over HTTP. A landing page at `/` plus one section per channel (`/gaming`, `/tech`, `/politics`, `/eu`, `/music`, `/anime`, `/foss`), all pulling from the `stories` table. A `/weather` page demos the seasonal canvas overlay in isolation. Adding a section is two lines in `internal/web/server.go` (the `channels` slice) plus a matching theme color in `internal/web/static/css/input.css`.
|
||||
|
||||
The frontend uses a small Tailwind build:
|
||||
|
||||
@@ -116,7 +123,7 @@ RSS Feed → Poller → GUID/Canonical/Headline Dedup → Article Fetch → Stor
|
||||
|
||||
| Package | Purpose |
|
||||
|---|---|
|
||||
| `internal/config` | YAML config loading with `${ENV}` expansion |
|
||||
| `internal/config` | TOML config loading with `${ENV}` expansion |
|
||||
| `internal/storage` | SQLite with WAL, FTS5, all queries |
|
||||
| `internal/ingestion` | Per-source RSS polling, feed parsing, image validation, paywall detection |
|
||||
| `internal/dedup` | Canonical URL + headline normalization helpers |
|
||||
|
||||
Reference in New Issue
Block a user