pygea/README.md

38 lines
1,015 B
Markdown

# pygea
Generate RSS feeds from the Pangea HTTP API using a TOML runtime config.
```shell
nix develop
uv sync --all-groups
cp demo/pygea.toml pygea.toml
$EDITOR pygea.toml
uv run pygea --config pygea.toml
```
Each `[[feeds]]` entry is explicit and stable:
```toml
[[feeds]]
name = "Info Martí "
slug = "info-marti"
only_newest = false
```
`slug` is required and is used as the output subdirectory name. Generated feeds are
written to `<output_directory>/<slug>/rss.xml`. A `manifest.toml` is also written to
`<output_directory>/manifest.toml` using the same `[[feeds]]` structure that
`republisher-redux` can import directly:
```toml
[[feeds]]
name = "Info Martí "
slug = "info-marti"
url = "file:///absolute/path/to/feed/info-marti/rss.xml"
```
Omit `content_type` on a feed to use `default_content_type`.
`PYGEA_API_KEY` takes precedence over `runtime.api_key` in the TOML config.
See [`demo/README.md`](/home/abel/src/gitlab.com/guardianproject-ops/pygea/demo/README.md) for a self-contained example.