CL-Mediawiki Moved to GitHub

I have moved CL-Mediawiki to github.  Why, you might ask?

  • Better authentication / user scheme (and other people manage it)
  • Pull / merge requests and request viewer (essentially I think github has a better story for distributing patches than’s mob branch)
  • Everything about the project in one place, no longer need both trac an just one git hub location
  • Prettier git-web
  • I am more comfortable with the github interface
  • It has a name and url I can remember without google’s help

I am still in the process of changing all the links and I will keep the links up (at least for a bit) so that people pointing to it don’t get lost.

CL-MediaWiki in Action

As mentioned in a previous post, we heavily utilize a MediaWiki instance in to manage a lot of small bits of data.  Last night I worked :cl-mediawiki into our internal billing system.  For many months it has been a manual process to create a new page and category for a client in our billing system.  We had a report that would give you a link and some default wiki text to type in.  With the desire to bring more notes into the wiki, and the advent of the edit-api available in MediaWiki 1.13, I set about writing cl-mediawiki to allow us to more directly integrate.

Now when a new client is entered into our billing system, we call out to the wiki to automatically create a wikipage and category for that client.  When a new order gets added to our system, we will add a new order page.  When that order is attached to an account or moved to a new account, we will replace the account number on their wiki page with the new account number.  When the order gets canceled, we can add the cancelation notes directly to the wiki.

CL-MediaWiki now also requires :cl-ppcre.  The upshot of this is a regex-replace-all function that will replace the content of a wikipage (with an optional value to set the page to if it doesnt exist).  This was used to keep the account number up to date on the order page.

link to the paste – Scroll down to see all the examples mentioned

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).