OPML Reader
Overview
Use scripts/opml_reader.py to (1) store OPML from a URL and (2) list the latest posts across all feeds in the OPML. Output timestamps are ISO-8601 in UTC.
Quick Start
- •Create a venv and install dependency:
bash
python3 -m venv ~/Code/sandbox/.venv-opml-reader ~/Code/sandbox/.venv-opml-reader/bin/pip install feedparser
- •Store an OPML file:
bash
~/Code/sandbox/.venv-opml-reader/bin/python scripts/opml_reader.py store \ "https://example.com/feeds.opml" \ "~/Code/Files/feeds.opml"
- •Fetch latest posts:
bash
~/Code/sandbox/.venv-opml-reader/bin/python scripts/opml_reader.py latest \ "~/Code/Files/feeds.opml" \ --limit 5
Workflow
- •If the user supplies an OPML URL, store it under
~/Code/Filesusingstore. - •If the OPML file already exists, reuse it unless the user explicitly asks to overwrite.
- •Run
latestto aggregate posts and return the newest entries across feeds. - •Report partial results if some feeds fail (network timeouts are expected on large lists).
Output Options
- •Default output:
textlines formatted asindex. title | feed | date | link. - •Use
--format jsonor--format tsvif the user needs machine-readable output. - •Dedupe is on by default. Use
--no-dedupeif the user wants raw results. - •Adjust
--workersand--timeoutfor large or slow feed lists.
Resources
scripts/
- •
scripts/opml_reader.py: Store OPML files and list latest posts across RSS/Atom feeds.