Switch config from YAML to TOML

This commit is contained in:
prosolis
2026-05-24 22:11:36 -07:00
parent e88483526d
commit 9d5db63c56
11 changed files with 280 additions and 253 deletions

View File

@@ -39,17 +39,17 @@ git clone <repo-url> && cd pete
go build -tags goolm .
# Create config from example
cp config.example.yaml config.yaml
# Edit config.yaml — fill in Matrix credentials, room IDs, and a direct_route for every source
cp config.example.yaml 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)
./pete -config config.yaml -seed
./pete -config config.toml -seed
# Post one story to verify the pipeline
./pete -config config.yaml -test
./pete -config config.toml -test
# Run
./pete -config config.yaml
./pete -config config.toml
```
## Configuration
@@ -62,7 +62,7 @@ See `config.example.yaml` for the full structure. Key sections:
- `sources` — RSS feeds with tier, polling interval, and **required** `direct_route` (must match a key in `matrix.channels`)
- `web` — read-only HTTP UI (enabled toggle, listen address, site title, public base URL)
Environment variables can be referenced with `${VAR}` syntax in the YAML.
Environment variables can be referenced with `${VAR}` syntax in the TOML.
### Web UI
@@ -91,7 +91,7 @@ With a 4-hour cadence Pete will post at most 6 stories/day, so set `posting.dail
| Flag | Description |
|---|---|
| `-config <path>` | Path to config file (default: `config.yaml`) |
| `-config <path>` | Path to config file (default: `config.toml`) |
| `-seed` | Ingest all current feed items as seen without posting, then exit |
| `-test` | Post one story to verify the full pipeline, then exit |