[Moin-user] moinmoin xmlrpc

Thomas Heller theller at ctypes.org
Thu Dec 14 10:55:28 EST 2006


I had the idea to maintain (at least some) pages of my moinmoin wiki
in a source code repository.  I also want to edit the pages locally,
and upload them to the wiki.

According to some docs I found this does indeed work:

"""
import xmlrpclib

URL = "http://localhost:8080/"
PAGE = "WikiSandbox"

srcwiki = xmlrpclib.ServerProxy(URL + "?action=xmlrpc2")
text = srcwiki.getPage(PAGE)
print text
"""

And there is even a putPage method, but this doesn't work:
"""
import xmlrpclib

##URL = "http://starship.python.net/crew/theller/wiki/"
URL = "http://localhost:8080/"
PAGE = "WikiSandbox"

srcwiki = xmlrpclib.ServerProxy(URL + "?action=xmlrpc2")
text = srcwiki.getPage(PAGE)
print srcwiki.putPage("WikiSandbox", text + "blah blah")
"""

The script prints:

{'faultCode': 1, 'args': [], 'faultString': 'You are not allowed to edit this page'}

although I don't have (at least I think so) not set any access limitations.
>From the browser I can edit this and other pages without being logged in.

Hm, is it possible at all to do this?

Thanks,
Thomas





More information about the Moin-user mailing list