Attachment 'lw2txt.py'
Download
1
2
3
4
5
6
7
8
9 import xmlrpclib
10 import time
11 import string
12
13 wiki = xmlrpclib.ServerProxy("http://www.larpwiki.de/?action=xmlrpc2")
14
15
16 pages = sorted(wiki.getAllPages())
17
18
19 count = 1
20 for page in pages:
21 pagename = page.encode('utf-8')
22 filename = string.replace(pagename + '.txt', '/', '%2F')
23 print("%i/%i %s" % (count, len(pages), filename))
24 text = wiki.getPage(page).encode('utf-8')
25 fd = open(filename, 'w')
26 fd.write(text)
27 fd.close()
28 time.sleep(0.05)
29 count += 1
New Attachment
Attached Files
To refer to attachments on a page, use
attachment:filename, as shown below in the list of files. Do
NOT use the URL of the
[get] link, since this is subject to change and can break easily.