|
|
|
@ -34,6 +34,7 @@ with open('login.txt', 'r') as login: # read login user & pwd
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SLASH = "\u2044"
|
|
|
|
|
HYPHEN = "\u2010"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def filenameforpage(p):
|
|
|
|
@ -44,7 +45,7 @@ def filenameforlink(href):
|
|
|
|
|
href = urlunquote(href)
|
|
|
|
|
if href.startswith("/sandbox/itchwiki/index.php/"):
|
|
|
|
|
href = href[len("/sandbox/itchwiki/index.php/"):]
|
|
|
|
|
href = href.replace(' ','_').replace('/', SLASH) + '.html'
|
|
|
|
|
href = href.replace(' ','_').replace('/', SLASH).replace('‐', HYPHEN) + '.html'
|
|
|
|
|
href = urlquote(href)
|
|
|
|
|
return href
|
|
|
|
|
|
|
|
|
@ -101,8 +102,8 @@ for cat in publish.members():
|
|
|
|
|
html = template.render(page=p, body=htmlsrc, staticpath='0')
|
|
|
|
|
|
|
|
|
|
with open(os.path.join(args.output, filenameforpage(p)), 'w') as f:
|
|
|
|
|
pass
|
|
|
|
|
# print(html, file=f)
|
|
|
|
|
f.write(html)
|
|
|
|
|
# print(html, file=f)
|
|
|
|
|
if args.one:
|
|
|
|
|
break
|
|
|
|
|
|
|
|
|
|