more ignore
parent
3c73736d2e
commit
af74945d1b
@ -1 +1 @@
|
|||||||
venv/
|
*~
|
||||||
|
@ -1,24 +0,0 @@
|
|||||||
import argparse
|
|
||||||
from mwclient import Site
|
|
||||||
|
|
||||||
NS_CATEGORY = 14
|
|
||||||
|
|
||||||
p = argparse.ArgumentParser(description="Dump wiki files to html")
|
|
||||||
p.add_argument("--host", metavar='', default="pzwiki.wdka.nl", help='wiki host')
|
|
||||||
p.add_argument("--path", metavar='', default="/mw-mediadesign/", help="Wiki path. Should end with /")
|
|
||||||
p.add_argument("--output", default="../", help="Output path for pages")
|
|
||||||
|
|
||||||
args = p.parse_args()
|
|
||||||
print(args)
|
|
||||||
# site and login
|
|
||||||
|
|
||||||
site = Site(host=args.host, path=args.path)
|
|
||||||
tasks=site.Categories['Tasks of the Contingent Librarian']
|
|
||||||
for card in tasks.members():
|
|
||||||
print ("<hr>")
|
|
||||||
print ("<h1>{}</h1>".format(card.page_title))
|
|
||||||
print ()
|
|
||||||
# print (card.text())
|
|
||||||
htmlsrc = site.parse(page=card.name)['text']['*']
|
|
||||||
print ("""<div class="card">{}</div>""".format(htmlsrc))
|
|
||||||
|
|
Loading…
Reference in New Issue