/mediawikitools

Java tools using the MediaWiki API

Primary LanguageJava

mediawikitools

Java tools using the MediaWiki API. Some of these are used on http://runescape.wikia.com/, but others are more general and can be used on any MediaWiki wiki.

Compiling

To compile Java files, you must have a Java development kit. There is the OpenJDK openjdk and [Oracle's JDK] oraclejdk.

You can use Eclipse eclipse or any other Java IDE of your choosing, with the Java development kit installed, to compile these files. There's already an Eclipse project description in the repository; feel free to make a pull request if you create a project for another IDE.

You can also use the included build.xml file with [Apache Ant] ant installed, as follows:

user@host ~/mediawikitools $ ant

Function of each file

After compiling all of the files, you can run the programs.

ImageOptimisationBot.java

Used on http://runescape.wikia.com/, this bot continuously runs and does a monthly pass on all the files on a wiki, as well as an hourly pass on the files whose description pages transclude Template:Compression. You can run this as follows:

user@host ~/mediawikitools $ java -classpath bin com.wikia.runescape.ImageOptimisationBot

Documentation for this bot can be found here.

ClanExpGainScraper.java

Used on http://runescape.wikia.com/, this bot runs when invoked (or scheduled to be invoked) and writes a column in a table of experience for a RuneScape runescape clan. You can run this as follows:

user@host ~/mediawikitools $ java -classpath bin com.wikia.runescape.ClanExpGainScraper

Documentation for this bot can be found here.

VisualEditorFailFixer.java

Used on http://runescape.wikia.com/, this bot continuously runs and monitors recent changes to clean up glitches from Wikia's Visual Editor after a cooldown period allowing for counter-vandalism. You can run this bot as follows:

user@host ~/mediawikitools $ java -classpath bin com.wikia.runescape.VisualEditorFailFixer

Documentation for this bot can be found here.

WikiShell.java

This wiki command-line tool allows you to read pages, get information about many types of objects (users, pages, categories and so on) and read page histories, as well as edit, create, protect, move and delete pages, assign user rights, and more. You can run this as follows:

user@host ~/mediawikitools $ java -classpath bin org.mediawiki.WikiShell [<wiki host or IP>] [<script path>]

Documentation for this shell can be found in the shell itself. Invoke the commands command, then use help <command name> to know more about one command.