blob: e285f060ce902e5e6544ee91447cfcf11b20a94c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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))
|