now with configuration
This commit is contained in:
parent
65b1520697
commit
34d26f7def
10 changed files with 497 additions and 83 deletions
17
demo/README.md
Normal file
17
demo/README.md
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
# Demo
|
||||
|
||||
This directory shows the runtime-config setup with a dedicated config file.
|
||||
|
||||
## Local Run
|
||||
|
||||
From the repo root:
|
||||
|
||||
```shell
|
||||
uv run repub --config demo/repub.toml
|
||||
```
|
||||
|
||||
Because `out_dir` in [`demo/repub.toml`](/home/abel/src/guardianproject/anynews/republisher-redux/demo/repub.toml) is relative, output is written under `demo/out/`.
|
||||
|
||||
## Files
|
||||
|
||||
- `repub.toml`: example runtime config with feed definitions and Scrapy overrides
|
||||
13
demo/repub.toml
Normal file
13
demo/repub.toml
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
out_dir = "out"
|
||||
|
||||
[[feeds]]
|
||||
name = "gp-pod"
|
||||
url = "https://guardianproject.info/podcast/podcast.xml"
|
||||
|
||||
[[feeds]]
|
||||
name = "nasa"
|
||||
url = "https://www.nasa.gov/rss/dyn/breaking_news.rss"
|
||||
|
||||
[scrapy.settings]
|
||||
LOG_LEVEL = "INFO"
|
||||
DOWNLOAD_TIMEOUT = 30
|
||||
Loading…
Add table
Add a link
Reference in a new issue