Add file URL RSS feed coverage
This commit is contained in:
parent
20b9759193
commit
fc102d9445
3 changed files with 69 additions and 0 deletions
|
|
@ -15,3 +15,20 @@ Because `out_dir` in [`demo/repub.toml`](/home/abel/src/guardianproject/anynews/
|
|||
## Files
|
||||
|
||||
- `repub.toml`: example runtime config with feed definitions and Scrapy overrides
|
||||
- `fixtures/local-feed.rss`: simple local RSS fixture for `file://` feed testing
|
||||
|
||||
## Local File Feed
|
||||
|
||||
`repub` already accepts absolute `file://` feed URIs. To point it at the demo fixture, generate an absolute URI like this from the repo root:
|
||||
|
||||
```shell
|
||||
python3 -c 'from pathlib import Path; print(Path("demo/fixtures/local-feed.rss").resolve().as_uri())'
|
||||
```
|
||||
|
||||
Then use that value in a config entry:
|
||||
|
||||
```toml
|
||||
[[feeds]]
|
||||
name = "local-demo"
|
||||
url = "file:///absolute/path/to/demo/fixtures/local-feed.rss"
|
||||
```
|
||||
|
|
|
|||
16
demo/fixtures/local-feed.rss
Normal file
16
demo/fixtures/local-feed.rss
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<rss version="2.0">
|
||||
<channel>
|
||||
<title>Local Demo Feed</title>
|
||||
<link>https://example.com/</link>
|
||||
<description>Simple local RSS fixture for file:// testing</description>
|
||||
<language>en</language>
|
||||
<item>
|
||||
<title>Local Demo Entry</title>
|
||||
<link>https://example.com/local-demo-entry</link>
|
||||
<description>Hello from a local file feed.</description>
|
||||
<guid isPermaLink="true">https://example.com/local-demo-entry</guid>
|
||||
<pubDate>Sat, 29 Mar 2026 12:00:00 GMT</pubDate>
|
||||
</item>
|
||||
</channel>
|
||||
</rss>
|
||||
Loading…
Add table
Add a link
Reference in a new issue