Posts Tagged ‘mediawiki’

Support Wikipedia, donate today!

Wikipedia Affiliate Button

This slogan reminds me of Cowboys Forever. Yuck.

It’s that time of the year again, the Wikimedia Foundation (best known for Wikipedia) is raising funds. I do question the wisdom of raising money during Christmas time – perhaps it works well?

So what does donations to the Wikimedia Foundation go toward? Let’s take a quick peak at the FAQ:

To people and technology. Even though Wikipedia and its sister projects are one of the top five most-visited websites in the world, we employ fewer than 35 people; see our staff overview. Roughly half work on technology, a small team supports our public outreach and volunteer cultivation activities, and the remaining staff work in fundraising and administration. In addition, your support helps to pay for the technology infrastructure (servers and bandwidth) that keep Wikipedia running and growing.

Fundamentally, the Wikimedia Foundation exists to support and grow the enormous network of volunteers who write and edit Wikipedia and its sister projects — more than 100,000 people around the world.

Okay, so that’s light on raw numbers. But luckily last year’s financial report is available for the curious.

So if you use Wikipedia (who doesn’t?), donate today. I’ve seen donations for as little as $1.00, so you have no excuse.

 

MediaWiki bot using JWBF (Java)

wiki! wiki!

wiki! wiki!

One of the nice things about Java is there seems to be a friendly (or at least relatively friendly) API for everything.

Java Wiki Bot Framework (JWBF) is a Java framework for working with wikis running MediaWiki (the wiki software used by Wikipedia and all the other Wikimedia Foundation projects).

A little off subject: who thought it was a good idea to name two distinct but related things WikiMedia and MediaWiki? Good luck keeping those terms straight.

Back to JWBF: It is pleasantly easy to use. Admittedly, my needs are far from complex: replace the text of a couple of templates on a regular basis. It’s hardly glamorous programming, but it should save us some time at work. Now we’ll have more time to sing along with
Dr. Horrible’s Sing-Along Blog.
Invent a freeze ray.

Happily the library exists in the central maven repository, so getting it included in my project is easy enough:

    <dependency>
      <groupId>net.sourceforge</groupId>
      <artifactId>jwbf</artifactId>
      <version>1.2-186</version>
      <scope>compile</scope>
    </dependency>

Actually using the framework is as easy as this:

        MediaWikiBot mediaWikiBot =
            new MediaWikiBot( "http://hostname/wiki/" );
        mediaWikiBot.login( "CurrentlyDeployedBot", "password" );
        Article article = new Article(mediaWikiBot.readContent(
            "Template:Currently deployed/Arinc" ), mediaWikiBot );
        article.setText( "Test" );
        article.save();

It’s always nice when things are this easy. *cheers*

One more thing: if you’re looking to create a bot or script for automatic or semi-automatic usage of Wikipedia, please review Wikipedia’s bot policy first.