MediaWiki Statistics and Panic’s Status Board

I’m a big fan of Panic Inc. I use Coda daily and am an advent follower of the smart dudes out of Portland.

They have a new app out called Status Board that allows you to mix different data sources to provide at-a-glance information on your iPad. What is even better is that it can output to a HD display for big screen status board updates.

At work I help manage a MediaWiki environment that we use to document stuff.1 Lately I’ve been trying to figure out how to leverage the MediaWiki API and the External Data Extension to manipulate data from external sources and content within the wiki.

With a few minutes time I figured out how display statistics from MediaWiki on a Status Board!

Basically I use the MediaWiki API to return some XML into a wiki page. That page is then in turn included as an HTML widget in Status Board. The result is something that looks like this:

mediawiki-status-board

Here’s the secret sauce. First create a wiki page to house your content. Then use the #get_web_data function of the External Data extension to pull in a xml feed from the MediaWiki API. Here’s what my code looks like for query of the number of jobs currently in queue.

{{#get_web_data:
url=http://yourwiki/wiki/api.php?action=query&meta=siteinfo&siprop=statistics&format=xml
|format=XML
|data=Jobs=jobs,Pages=pages
}}</pre></pre>
<div style="width: 100%; text-align: center;">42px;">Jobs in Queue</div>
<pre>

74px;">{{#external_value:Jobs}}
<pre>

Then in Status Board enter in the address for your wiki page using the &action=render2 attribute.

http://yourwiki/wiki/index.php?title=wikipagetitle&action=render

Some other examples, as you can see in the screenshot above, are a list of the N newest articles, most recent edits, or even additions to specific categories (at the bottom). The sky is the limit!