diff options
author | Yves Fischer <yvesf-git@xapek.org> | 2015-11-22 01:36:39 +0100 |
---|---|---|
committer | Yves Fischer <yvesf-git@xapek.org> | 2015-11-22 01:36:39 +0100 |
commit | f8cfab4db9e197a403da6c444de1eb295357c9c3 (patch) | |
tree | 1ed6772d966c68f4e457c4a2612ef256d01a4efb /watchnews-cli | |
parent | 6080b38fb2b6b3c1017bdd34bb7552bc7e26a4a0 (diff) | |
download | watchnews-f8cfab4db9e197a403da6c444de1eb295357c9c3.tar.gz watchnews-f8cfab4db9e197a403da6c444de1eb295357c9c3.zip |
generation of rss feed
Diffstat (limited to 'watchnews-cli')
-rwxr-xr-x | watchnews-cli | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/watchnews-cli b/watchnews-cli index 53f5104..2fe9cd5 100755 --- a/watchnews-cli +++ b/watchnews-cli @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -from watchnews import data, web, fetch +from watchnews import data, web, fetch, rss import os import argparse @@ -26,6 +26,8 @@ if __name__ == "__main__": parser.add_argument("--db", metavar="DBPATH", default=os.path.join(os.path.dirname(__file__), "db.sqlite"), help="Path to sqlite database file") + parser.add_argument("--rss", action='store_true', + help="Dump a RSS feeds") args = parser.parse_args() @@ -54,4 +56,7 @@ if __name__ == "__main__": feed, feed.created_date.strftime('%x %X'))) if args.web: web.get_app().run() + if args.rss: + print(rss.rss()) + |