[ Home | Diaries | Account | Members | Projects | FAQ ] 

As promised, mod_virgule (the code to drive the late Advogato and still running ROBOTS.NET) is now released under GPL, and is available in https://github.com/steevithak/mod_virgule . Feel free to play with it, although it's probably a good idea to coordinate with Steven Rainwater before making nontrivial changes, as there are some core changes he had in mind.

You'll need recent versions of glib and libxml2 to build and install mod_virgule.

Most important, have fun!

mod_virgule 1.41 now has an XML-RPC interface available at the URL http://robots.net/XMLRPC. To test it, try calling one of the test functions below. If you are using Python2.7, for example, try the following:

>>> import xmlrpclib
>>> server = xmlrpclib.Server("http://robots.net/XMLRPC")
>>> server.test.sumprod(5, 7)

It should return [12, 35].


string cookie = authenticate(string user, string pass)
Returns a cookie which is used as the first argument to all methods requiring authentication.

Diary manipulation

int length = diary.len(string user)
Return the number of entries in a diary.
string html = diary.get(string user, int index)
Return a diary entry. The index is zero-based, so if diary.len() returns 2 then valid indices are 0 and 1.
date created, date updated = diary.getDates(string user, int index)
Return the creation and last updated dates of a diary entry. If the entry has not been updated then the updated date will be the same as the creation date.
diary.set(string cookie, int index, string html)
Set a diary entry. Use -1 as the index to post a new entry, although the value returned by diary.len() is also acceptable.

Test functions

string s, int i = test.guess()
Guess a number
int result = test.square(int x)
Square a number
int sum, int product = test.sumprod(int x, int y)
Return the sum and product of a pair of numbers
int len = test.strlen(string s)
Return the length of a string
string s = test.capitalize(string s)
Capitalize a string
 [ Home | Diaries | Account | Members | Projects | FAQ ]