[Moin-user] Rename action in xmlrpc

Zarick Lau zarick at gmail.com
Tue Apr 8 23:17:45 EDT 2008


Hi Waldmann,

> > After upgrade to 1.6.0, I found xmlrpc setup has changed.
>
>  You need to use actions_excluded = [] (because the default is
>  ['xmlrpc']).
>
>  This was done because in 1.6+ it is possible to use xmlrpc to WRITE to
>  pages by default - IF xmlrpc is enabled.
>
>  Older moin versions needed some separate settings / hacks to open your
>  wiki for xmlrpc write access.
>
>  We did not want to open all the moin wikis out there to xmlrpc write
>  access without the admin explicitely doing it (and thinking about it).
>

Yes, agreed. Btw, My primary means of writing wiki pages is done through
xmlrpc since 1.5.x :)
Personally, I really prefer to do editing in vim, bypassing the browser UI..

>
>  > However, I found that, I'm no no longer doing rename
>  > with xmlrpc. It is still supported (just I'm doing it wrong),
>  > or rename is removed (if yes, why it is removed?).
>
>  Please show your code that is not working and also the error msg you
>  get.

The following is the code fragment which I used for rename operation.
The xmlrpc call completed without any error.
But moinmoin doesn't rename the page correctly.

    self.homewiki = xmlrpclib.ServerProxy(wikiurl, allow_none=True)
    self.authToken = self.homewiki.getAuthToken(username, password)

    mc = xmlrpclib.MultiCall(self.homewiki)
    mc.applyAuthToken(self.authToken)

    self.pageNameFrom = argv[0]
    self.pageNameTo = argv[1]

    mc.renamePageWithAttributes(
            self.pageNameFrom, self.pageNameTo, {})
    mc()


The full script can be found in this URL.
http://www.nixstyle.net/random/moin-remote

PS: The script is used to list / write page / read page / rename page.
Worked since 1.5.8 and updated to work with 1.6.0 (mainly MultiCall stuff).

When I have ironed out all rough edges I'll release it.

Best regards,
Zarick




More information about the Moin-user mailing list