aboutsummaryrefslogtreecommitdiff
path: root/plugins
Commit message (Collapse)AuthorAge
* rst: Use Python 3 instead of Python 2Simon McVittie2018-02-28
| | | | Signed-off-by: Simon McVittie <smcv@debian.org>
* plugins/proxy.py: be compatible with Python 3Simon McVittie2014-09-04
|
* partially revert 154c4ea9echrysn2014-03-12
| | | | | | | explicitly en- and decoding xmlrpc requests in the python proxy broke plugins on debian sid, while it was introduced to fix breakage in debian stable. it is assumed that an xml module involved changed its behavior from str to unicode, this patch handles both cases.
* properly encode and decode from/to utf8 when sending rpc to ikiwikiAntoine Beaupré2014-02-03
| | | | somehow, in receive this is not necessary/possible because the xml library expects strings and not unicode
* Fix python proxy to not crash when fed unicode data in getstate and setstate.Joey Hess2013-07-10
|
* proxy: add indexes to format stringsW. Trevor King2012-10-10
|
* rst: add indexes to format stringsW. Trevor King2012-10-10
| | | | | For Python 2.6 compatibility. You're only allowed to omit the positional argument specifiers in Python 2.7 and later.
* proxy: convert iteritems() and and itervalues() to items() and values()W. Trevor King2012-09-29
| | | | The former no longer exist in Python 3.
* proxy: don't pass arguments to format_exc() in IkiWikiProcedureProxy.run()W. Trevor King2012-09-29
| | | | | | | | | | | | | | | | | | | | | | | This avoids: Traceback (most recent call last): File "./plugins/rst", line 86, in <module> proxy.run() File "/home/wking/src/ikiwiki/plugins/proxy.py", line 316, in run e, traceback.format_exc(sys.exc_info()[2]))) File "/usr/lib/python3.2/traceback.py", line 269, in format_exc ... TypeError: unorderable types: int() < traceback() The syntax for format_exc in Python 2.x is: traceback.format_exc([limit]) In Python 3.x, it is: traceback.format_exc(limit=None, chain=True) Neither of these need any information from sys.exc_info() passed in.
* proxy: SimpleXMLRPCServer renamed to xmlrpc.server in Python 3W. Trevor King2012-09-29
|
* proxy: xmlrpclib renamed to xmlrpc.client in Python 3W. Trevor King2012-09-29
|
* proxy: update string formatting and error catching syntaxW. Trevor King2012-09-29
|
* proxy: bump to version 0.2W. Trevor King2012-09-28
|
* proxy: update copyright owners (based on the Git history)W. Trevor King2012-09-28
|
* rst: update string formatting and error catching syntaxW. Trevor King2012-09-28
|
* rst: bump to version 0.4W. Trevor King2012-09-28
|
* rst: strip trailing whitespaceW. Trevor King2012-09-28
|
* rst: update copyright owners (based on the Git history)W. Trevor King2012-09-28
|
* rst: import docutils lazily, to avoid errors during ikiwiki --setupSimon McVittie2011-10-22
| | | | | Bug-Debian: http://bugs.debian.org/637604 Signed-off-by: Simon McVittie <smcv@debian.org>
* Changed license of madduck's python plugins from GPL-2 to BSD-2-clause.Joey Hess2011-05-19
| | | | | | Apparently the rst library is changing to a GPL-2 incompatable license. "madduck: joeyh: so yes, do as you think is right."
* format plugin categorizationJoey Hess2010-02-12
|
* Use env hack in python scripts.Joey Hess2009-12-29
|
* Support RPC::XML 0.69's incompatable object instantiation method.Joey Hess2009-09-29
|
* rst: Introduce _to_dict to turn argument list into keword argsUlrik Sverdrup2009-09-28
| | | | (cherry picked from commit 7d788655104089b5747a5ff1a4c5106eac871c14)
* function injection overhaulJoey Hess2008-10-21
| | | | | | | | | | | Add an inject function, that can be used by plugins that want to replace one of ikiwiki's functions with their own version. (This is a scary thing that grubs through the symbol table, and replaces all exported occurances of a function with the injected version.) external: RPC functions can be injected to replace exported functions. Removed the stupid displaytime hook, and use injection instead.
* change example to override a real functionJoey Hess2008-10-21
|
* add getsetup hookJoey Hess2008-08-06
| | | | in python, even, wow
* scan hook works, remove NotImplemented exceptionmartin f. krafft2008-03-21
| | | | Signed-off-by: martin f. krafft <madduck@madduck.net>
* Do not output xml-rpc debuggingmartin f. krafft2008-03-21
| | | | Signed-off-by: martin f. krafft <madduck@madduck.net>
* Flesh out pythondemomartin f. krafft2008-03-21
| | | | | | | This implements most hooks with stupid demo code, and also still has some TODO items. Signed-off-by: martin f. krafft <madduck@madduck.net>
* Handle going down with an exceptionmartin f. krafft2008-03-21
| | | | | | | | We previously used None as a sentinel to exit, but None is now a proper value, so now it's the job of an exception-like object (except it isn't an exception). Signed-off-by: martin f. krafft <madduck@madduck.net>
* put XMLStreamParser in public namespacemartin f. krafft2008-03-21
| | | | | | | Since we might throw sub-class exceptions, the class should be in the public namespace, meaning its name should not be prefixed with _. Signed-off-by: martin f. krafft <madduck@madduck.net>
* Allow individual hook registration to override IDmartin f. krafft2008-03-21
| | | | | | | | | The preprocessor hooks need to specify IDs different from the ID used to initialise the proxy. Thus, the hook function now takes an optional id keyword argument and uses the ID used during initialisation if none is provided. Signed-off-by: martin f. krafft <madduck@madduck.net>
* Refactor remote procedure calls in the proxymartin f. krafft2008-03-21
| | | | | | | | | | | Add an rpc() method to the proxy to allow users to call remote procedures, and route the proxy's own import registration via this function. Also, implement convenience functions for the RPC calls exported in the IkiWiki::XML::RPC namespace. Signed-off-by: martin f. krafft <madduck@madduck.net>
* Make proxy object available to hook functionsmartin f. krafft2008-03-21
| | | | | | | Hook functions now get the proxy object as first argument to be able to use RPC via the proxy. Signed-off-by: martin f. krafft <madduck@madduck.net>
* add last parameter to plugin registrationmartin f. krafft2008-03-21
| | | | Signed-off-by: martin f. krafft <madduck@madduck.net>
* Allow external plugins to return no valuemartin f. krafft2008-03-21
| | | | | | | | | | | | | Instead of using the XML-RPC v2 extension <nil/>, which Perl's XML::RPC::Parser does not (yet) support (Joey's patch is pending), we agreed on a sentinel: {'null':''}, that is, a hash with a single key "null" pointing to the empty string. The Python proxy automatically converts None appropriately and raises an exception if a hook function should, by weird coincidence, attempt to return {'null':''}. Signed-off-by: martin f. krafft <madduck@madduck.net>
* first implementation of a python demomartin f. krafft2008-03-17
| | | | (cherry picked from commit bbdf127917a13b81cef50995098f479ef4fe1cf9)
* force data written to stdout to be a stringmartin f. krafft2008-03-17
| | | | (cherry picked from commit 65c24d4aeca6188f4423ad1809f2415285843155)
* Print traceback for unhandled exceptionsmartin f. krafft2008-03-17
| | | | (cherry picked from commit 10574a324e03cd0533e77f46ead6e4c6a6e5568f)
* rename register_hook to just hook, for consistency with the perlJoey Hess2008-03-15
|
* does not need to be executableJoey Hess2008-03-15
|
* fix debug methodmartin f. krafft2008-03-15
| | | | | Signed-off-by: martin f. krafft <madduck@madduck.net> (cherry picked from commit e924b6777ac0b6d04116f563f0fe749595e03d13)
* improve debug outputmartin f. krafft2008-03-15
| | | | | Signed-off-by: martin f. krafft <madduck@madduck.net> (cherry picked from commit 63c7e393692b44bfa69d8b78a936f58beadef2b2)
* remove todo comment about refactoringmartin f. krafft2008-03-15
| | | | | Signed-off-by: martin f. krafft <madduck@madduck.net> (cherry picked from commit c6e7416f65285eba154a6a9b08c1401490f68bd1)
* fix meta datamartin f. krafft2008-03-15
| | | | | Signed-off-by: martin f. krafft <madduck@madduck.net> (cherry picked from commit 4b039b81deef852759f2aa88ae04f38d792b9bf8)
* Bump rst plugin version to 0.3martin f. krafft2008-03-15
| | | | | Signed-off-by: martin f. krafft <madduck@madduck.net> (cherry picked from commit 338cacc006d3b58bc827a8009e9a991b0cabf367)
* Rewrite rst plugin for Python xml-rpc proxymartin f. krafft2008-03-15
| | | | | Signed-off-by: martin f. krafft <madduck@madduck.net> (cherry picked from commit c877e9b4b93b550710cb26e2b0bafad4922ff209)
* Provide XML-RPC proxy abstraction for Python pluginsmartin f. krafft2008-03-15
| | | | | | | | | The proxy module provides an abstraction to facilitate writing ikiwiki plugins in Python. Signed-off-by: martin f. krafft <madduck@madduck.net> (cherry picked from commit f347e83d82f26cdc59de17b754a78db58a933ea6)
* add debbug reference to SimpleXMLRPCDispatcher workaroundmartin f. krafft2008-03-12
| | | | Signed-off-by: martin f. krafft <madduck@madduck.net>