diff --git a/mobili_cli/utils/authenticate.py b/mobili_cli/utils/authenticate.py old mode 100644 new mode 100755 index 7625832..83b9c89 --- a/mobili_cli/utils/authenticate.py +++ b/mobili_cli/utils/authenticate.py @@ -2,7 +2,7 @@ import sys import json -import sgqlc.endpoint.http import HTTPEndpoint +from sgqlc.endpoint.http import HTTPEndpoint mutation = """ diff --git a/mobili_cli/utils/load-rss-feed.py b/mobili_cli/utils/load-rss-feed.py new file mode 100755 index 0000000..cc124e6 --- /dev/null +++ b/mobili_cli/utils/load-rss-feed.py @@ -0,0 +1,16 @@ +#!/usr/bin/env python3 + +import sys +import feedparser + +try: + url = sys.argv[1] + + f = feedparser.parse(url) + for dogodek in f['entries']: + print(dogodek) + +except ValueError: + raise SystemExit('Usage: load-rss-feed.py ') + + diff --git a/primeri/izpisi-neodvisni.sh b/primeri/izpisi-neodvisni.sh new file mode 100755 index 0000000..2970d4b --- /dev/null +++ b/primeri/izpisi-neodvisni.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +url="https://www.neodvisni.art/novice/feed" + +../mobili_cli/utils/load-rss-feed.py $url diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..614b2ca --- /dev/null +++ b/requirements.txt @@ -0,0 +1,2 @@ +sgqlc==v14.1 +feedparser==6.0.8