view MoinMoin/script/xmlrpc/ @ 6133:a6283e189869 default tip

fixup: remove nonexisting passlib.utils._blowfish this was removed by the passlib 1.7.1 upgrade.
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Thu, 01 Jun 2017 18:10:19 +0200
parents a20de9383481
line wrap: on
line source

# -*- coding: iso-8859-1 -*-
MoinMoin - page contents retriever

@copyright: 2006 MoinMoin:ThomasWaldmann
@license: GNU GPL, see COPYING for details.

import xmlrpclib

from MoinMoin.script import MoinScript

class PluginScript(MoinScript):
This tool allows you to print out the contents of a page via xmlrpc.

Detailed Instructions:
General syntax: moin [options] xmlrpc retrieve [retrieve-options]

[options] usually should be:
    --config-dir=/path/to/my/cfg/ --wiki-url=

[retrieve-options] see below:
    0. To retrieve the page 'FrontPage' from the wiki '' which is
       running xmlrpc
       moin ... xmlrpc retrieve FrontPage

    def __init__(self, argv, def_values):
        MoinScript.__init__(self, argv, def_values)
        self.argv = argv

    def mainloop(self):
        s = xmlrpclib.ServerProxy(self.argv[0])
        print s.getPage(self.argv[1])