Add README

This commit is contained in:
Tim Van Baak 2023-06-10 21:11:13 -07:00
parent 01f9849aec
commit 32d2a20863
2 changed files with 14 additions and 1 deletions

13
intake-rss/README.md Normal file
View File

@ -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 `<title>`. Item titles are in the format "[feed title]: [item title]".

View File

@ -22,7 +22,7 @@ def main():
stderr("Failed to parse feed", feed_url) stderr("Failed to parse feed", feed_url)
return 1 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: for entry in feed.entries:
item = {} item = {}