Removed dirname, because why?
This commit is contained in:
parent
b87e8598d5
commit
2bad7f2cb3
|
@ -44,7 +44,8 @@ def main():
|
|||
print("Usage: %s" % sys.argv[0])
|
||||
sys.exit(-1)
|
||||
|
||||
output_dir = os.path.dirname(os.path.abspath(sys.argv[1]))
|
||||
output_dir = os.path.abspath(sys.argv[1])
|
||||
|
||||
|
||||
if not os.path.exists(output_dir):
|
||||
os.mkdir(output_dir)
|
||||
|
|
|
@ -5,6 +5,7 @@ import shutil
|
|||
|
||||
# Mostly copypasta from https://github.com/LongHairedHacker/verdandi/blob/master/mixins/fileassetsmixin.py
|
||||
|
||||
|
||||
def copy_file(source_path, dest_path):
|
||||
print("Copying %s to %s" % (source_path, dest_path))
|
||||
|
||||
|
|
20
cms/test.py
20
cms/test.py
|
@ -1,20 +0,0 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import requests
|
||||
import mwparserfromhell
|
||||
import pypandoc
|
||||
|
||||
def main():
|
||||
resp = requests.get("https://events.ccc.de/congress/2017/wiki/index.php?title=Assembly:CSOC&action=raw")
|
||||
|
||||
wikicode = mwparserfromhell.parse(resp.text)
|
||||
properties = {str(param.name) : param.value for param in wikicode.filter_templates()[0].params}
|
||||
|
||||
|
||||
print(properties)
|
||||
|
||||
output = pypandoc.convert_text(resp.text, 'html', format='mediawiki')
|
||||
print(output)
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
Loading…
Reference in New Issue