switch to TOML config and export republisher feed manifests
This commit is contained in:
parent
98dcea4d7e
commit
897af2872c
17 changed files with 832 additions and 324 deletions
38
README.md
Normal file
38
README.md
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
# 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.
|
||||
Loading…
Add table
Add a link
Reference in a new issue