summaryrefslogtreecommitdiff
path: root/watchnews-cli
diff options
context:
space:
mode:
Diffstat (limited to 'watchnews-cli')
-rwxr-xr-xwatchnews-cli7
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())
+