Announcing CL-MediaWiki: A Common Lisp interface to the MediaWiki API

UPDATE: Changed hosting information at the bottom

We use a MediaWiki instance at work to manage a tremendous amount of random facts.  We have it setup with Sphinx FTI to get good search results and have found the wiki to be a huge help in managing our data.  In fact, via a bit of reverse proxy magic, some of the notes fields in our internal billing application are chunks of a wiki page for that client with links to all of that client’s other attached wiki pages

Media Wiki Notes Field Screen Shot

Media Wiki Notes Field Screen Shot

We wanted the ability to interact with the wiki in a more programatic manner (such as making cancelation notes), so I started checking into the media wiki api.  It gives you the ability to do almost anything you would want to do with the Media Wiki engine programatically (except I cant figure out how to get it to render wiki markup for me).  I wanted a wrapper around this in Common Lisp which could take care of formulating the messages to the wiki engine and determining whether or not we succeeded preferably leaving these as just function calls to the rest of application.  Because I could find no mention of a library like this elsewhere, I decided to go ahead and whip one up.

Using :cxml :drakma, & :cl-unification, I have written a very incomplete wrapper around media wiki remote api.  The basic call cycle so far is as follows:

  • Build a list of parameters / values based on the api documentation
  • Feed these into Drakma to make the request of the media wiki api
  • Use CXML to parse the returned XML string into an XML-S tree
  • Use CL-Unification to match the response XML and extract data for return (when successful) and error conditions which we signal (if it is not).
GITHUB:   https://github.com/bobbysmith007/cl-mediawiki
CLiki: http://www.cliki.net/cl-mediawiki

One thought on “Announcing CL-MediaWiki: A Common Lisp interface to the MediaWiki API

  1. Pingback: Russ’s Tech Blog » Blog Archive » CL-MediaWiki in Action

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>