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
20
demo/README.md
Normal file
20
demo/README.md
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
# Demo
|
||||
|
||||
This directory shows the TOML runtime-config layout for `pygea`.
|
||||
|
||||
## Local Run
|
||||
|
||||
From the repo root:
|
||||
|
||||
```shell
|
||||
uv run pygea --config demo/pygea.toml
|
||||
```
|
||||
|
||||
Because `output_directory` in [`demo/pygea.toml`](/home/abel/src/gitlab.com/guardianproject-ops/pygea/demo/pygea.toml) is relative, output is written under `demo/feed/`.
|
||||
|
||||
## Files
|
||||
|
||||
- `pygea.toml`: example runtime config with domain, feed definitions, runtime options, and output paths
|
||||
|
||||
After a successful run, `demo/feed/manifest.toml` will contain `[[feeds]]` entries
|
||||
with absolute `file://` URLs pointing at the generated `rss.xml` files.
|
||||
46
demo/pygea.toml
Normal file
46
demo/pygea.toml
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
domain = "www.martinoticias.com"
|
||||
default_content_type = "articles"
|
||||
|
||||
[[feeds]]
|
||||
name = "Titulares"
|
||||
slug = "titulares"
|
||||
only_newest = true
|
||||
|
||||
[[feeds]]
|
||||
name = "Cuba"
|
||||
slug = "cuba"
|
||||
only_newest = true
|
||||
|
||||
[[feeds]]
|
||||
name = "América Latina"
|
||||
slug = "america-latina"
|
||||
only_newest = true
|
||||
|
||||
[[feeds]]
|
||||
name = "Info Martí "
|
||||
slug = "info-marti"
|
||||
only_newest = false
|
||||
|
||||
[[feeds]]
|
||||
name = "Noticiero Martí Noticias"
|
||||
slug = "noticiero-marti-noticias"
|
||||
only_newest = true
|
||||
|
||||
[runtime]
|
||||
# api_key = "set-me-or-use-PYGEA_API_KEY"
|
||||
max_articles = 10
|
||||
oldest_article = 3
|
||||
authors_p = true
|
||||
no_media_p = false
|
||||
content_inc_p = true
|
||||
content_format = "MOBILE_3"
|
||||
verbose_p = true
|
||||
|
||||
[results]
|
||||
output_to_file_p = true
|
||||
output_file_name = "rss.xml"
|
||||
output_directory = "./feed"
|
||||
|
||||
[logging]
|
||||
log_file = "./logs/pangea.log"
|
||||
default_log_level = "WARNING"
|
||||
Loading…
Add table
Add a link
Reference in a new issue