X-Git-Url: http://git.tremily.us/?p=ikiwiki.git;a=blobdiff_plain;f=plugins%2Fproxy.py;h=582010c9af550c87d7f045128efd49e62faacd26;hp=b2db79b0ebeca6bce694c66c627bd87f32f46f97;hb=646392f3672094b90dec02eff1b0d4ac4ebb0742;hpb=bd4769fac49fed4f5f900e05a440ca2e06403c55 diff --git a/plugins/proxy.py b/plugins/proxy.py old mode 100755 new mode 100644 index b2db79b0e..582010c9a --- a/plugins/proxy.py +++ b/plugins/proxy.py @@ -1,13 +1,13 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # -# xmlrpc — helper for Python-based external (xml-rpc) ikiwiki plugins +# proxy.py — helper for Python-based external (xml-rpc) ikiwiki plugins # # Copyright © martin f. krafft # Released under the terms of the GNU GPL version 2 # -__name__ = 'xmlrpc' -__description__ = 'xml-rpc-based ikiwiki plugin to process RST files' +__name__ = 'proxy.py' +__description__ = 'helper for Python-based external (xml-rpc) ikiwiki plugins' __version__ = '0.1' __author__ = 'martin f. krafft ' __copyright__ = 'Copyright © ' + __author__ @@ -108,7 +108,7 @@ class _IkiWikiExtPluginXMLRPCHandler(object): def send_rpc(self, cmd, in_fd, out_fd, **kwargs): xml = xmlrpclib.dumps(sum(kwargs.iteritems(), ()), cmd) - self._debug_fn('sending xml to ikiwiki to call procedure %s: [%s]' % (cmd, xml)) + self._debug_fn("calling ikiwiki procedure `%s': [%s]" % (cmd, xml)) _IkiWikiExtPluginXMLRPCHandler._write(out_fd, xml) self._debug_fn('reading response from ikiwiki...') @@ -151,7 +151,7 @@ class IkiWikiProcedureProxy(object): self._xmlrpc_handler = _IkiWikiExtPluginXMLRPCHandler(self._debug_fn) self._xmlrpc_handler.register_function(self._importme, name='import') - def register_hook(self, type, function): + def hook(self, type, function): self._hooks.append((type, function.__name__)) self._xmlrpc_handler.register_function(function)