From 32d2a2086367d7acaffde881c8d02614bf3b36b7 Mon Sep 17 00:00:00 2001 From: Tim Van Baak Date: Sat, 10 Jun 2023 21:11:13 -0700 Subject: [PATCH] Add README --- intake-rss/README.md | 13 +++++++++++++ intake-rss/intake_rss/__init__.py | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 intake-rss/README.md diff --git a/intake-rss/README.md b/intake-rss/README.md new file mode 100644 index 0000000..14a44c8 --- /dev/null +++ b/intake-rss/README.md @@ -0,0 +1,13 @@ +# intake-sources + +This repo contains programs that act as `intake` feed sources. + +## intake-rss + +A feed source that wraps an RSS or Atom feed. + +Supported `env`: + +- `FEED_URL`: Required. The url of the RSS/Atom feed. +- `FEED_TITLE`: Override the feed ``. Item titles are in the format "[feed title]: [item title]". + diff --git a/intake-rss/intake_rss/__init__.py b/intake-rss/intake_rss/__init__.py index 5694f08..185a96a 100644 --- a/intake-rss/intake_rss/__init__.py +++ b/intake-rss/intake_rss/__init__.py @@ -22,7 +22,7 @@ def main(): stderr("Failed to parse feed", feed_url) return 1 - feed_title = feed.feed.get("title") or os.environ.get("FEED_TITLE") + feed_title = os.environ.get("FEED_TITLE") or feed.feed.get("title") for entry in feed.entries: item = {}