From d9a668312c152d4f64318010ec84340015d896bb Mon Sep 17 00:00:00 2001 From: Yves Fischer Date: Wed, 17 Feb 2016 00:10:30 +0100 Subject: Import to git --- wikifolio-rss | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 wikifolio-rss (limited to 'wikifolio-rss') diff --git a/wikifolio-rss b/wikifolio-rss new file mode 100755 index 0000000..e285f06 --- /dev/null +++ b/wikifolio-rss @@ -0,0 +1,18 @@ +#!/usr/bin/python3 +import os +import sys +import logging + +import wikifolio +import wikifolio.rss + +logging.basicConfig(level=logging.INFO) + +if len(sys.argv) == 2 and os.path.exists(sys.argv[1]): + filename = sys.argv[1] + name = os.path.basename(filename) + name = name[:name.find('.')] + cert = wikifolio.get_id_from_name(name) + comments = wikifolio.get_comments(cert) + with open(filename, "w") as f: + f.write(wikifolio.rss.dump(cert, comments)) -- cgit v1.2.1