Attachment 'moin-upload.py'
Download
1
2 import sys
3 import string
4 import xmlrpclib
5 wiki = xmlrpclib.ServerProxy("http://moin.larpwiki.de/?action=xmlrpc2")
6 user = 'LarpWikiMigration'
7 passwd = '*******'
8
9 pagename = sys.argv[1]
10 content_lines = sys.stdin.readlines()
11 content = string.join(content_lines,'')
12
13 auth_token = wiki.getAuthToken(user, passwd)
14 mc = xmlrpclib.MultiCall(wiki)
15 mc.applyAuthToken(auth_token)
16 mc.putPage(pagename, content)
17 result = mc()
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.