1
# -*- coding: iso-8859-1 -*-
3
MoinMoin - remote command execution, client part
5
@copyright: 2006 MoinMoin:ThomasWaldmann
6
@license: GNU GPL, see COPYING for details.
12
from MoinMoin.script import MoinScript, fatal
14
class PluginScript(MoinScript):
18
This tool allows you to execute moin scripts remotely.
20
Detailed Instructions:
21
======================
22
General syntax: moin [options] xmlrpc remote [remote-options]
24
[options] usually should be:
25
--config-dir=/path/to/my/cfg/ --wiki-url=wiki.example.org/
27
[remote-options] see below:
28
0. Verify that you have a remotescriptconf.py configuration file.
30
1. To run the script 'account check' remotely.
31
moin ... xmlrpc remote account check
34
def __init__(self, argv, def_values):
35
MoinScript.__init__(self, argv, def_values)
40
import remotescriptconf as conf
42
fatal("Could not find the file remotescriptconf.py. Maybe you want to use the config param?")
44
secret = conf.remotescript_secret
45
url = conf.remotescript_url
46
print url, secret, self.argv
48
s = xmlrpclib.ServerProxy(url)
51
# xmlrpclib.Binary(sys.stdin.read())
52
result = s.RemoteScript(secret, self.argv)
53
# TODO handle stdout, stderr
56
print >> sys.stderr, result