Personal tools
You are here: Home / Library / Web / XML-RPC

XML-RPC Protocol

We document here attempts to come up with a command-line script that would post a picture or a gem directly from a UNIX machine to a Manila site. Our first victim (after some unpleasant experiences with the mess of modules that is Perl) is Python and the XML-RPC module. Our guiding light is this discussion message and the replies.

After putting the XML-RPC module files in $HOME/lib/python, the simple example works:

tempest(~)% setenv PYTHONPATH $HOME/lib/python
tempest(~)% python
>>> from xmlrpclib import Server
>>> betty = Server("http://betty.userland.com")
>>> print betty.examples.getStateName(43)
Texas
>>>

Manila.py

We go on to create a class manila.py following David Detlefsen post mentioned above. All the RPC handlers used in that class seem to be defined in Frontier manila.root in manilaSuite.rpcHandlers table. Then the postjpeg.py script can be used to post JPEG files from GIMP using the command line. But there doesn't seem to be a suitable XML-RPC interface in Manila for posting gems?

Manilalib.py

As of October 2001, there is an even fuller interface to Manila for Python, called pyManila. We had to create a slightly modified version to work with the site names we use, and made an updated script to use this module. The advantage over our older module is that pyManila supports news items; a similar news item script posts CVS log entries to a Manila server. It needs to be invoked from $CVSROOT/CVSROOT/loginfo like this:

pager (echo %s; cat) | postcvslog Pager
where pager is CVS module match string and Pager is the corresponding news item department name.

There are also other useful Python modules written by Mark Pilgrim, including wrapper to the Google API.

Scripts

Links

Grid

« May 2013 »
May
MoTuWeThFrSaSu
12345
6789101112
13141516171819
20212223242526
2728293031