Working With MediaWiki by Yaron Koren

Working With MediaWiki by Yaron Koren

Author:Yaron Koren [Koren, Yaron]
Language: eng
Format: epub
ISBN: 9780615720302
Publisher: WikiWorks Press
Published: 2012-11-25T23:00:00+00:00


Bots and the MediaWiki API

There are various tools for making automated changes to the wiki’s contents, like the Replace Text extension. But in many cases the set of edits required is too specific to be handled by an automated tool. For all those cases, there are bots, and the MediaWiki API.

A bot, in MediaWiki terminology, is a script that does one or more specific kind of edits, or retrieves one or more pieces of data. A bot can be written in any programming language: it just has to connect with the MediaWiki API, which does the actual work of writing and reading data. Most of the major programming languages have one or more MediaWiki API libraries written for them, which take care of the details of logging in to the wiki and connecting to the API. But even without a library, it’s not that hard to create a MediaWiki bot — the script just needs to hit some MediaWiki URLs.

If a bot makes any edits on a wiki, it should ideally be logged in as a user — and ideally that user should be a separate account, which gets added to the "bots" group. You can see these kinds of accounts all over Wikipedia — they’re the ones fixing broken <ref> tags, renaming categories, adding signatures to unsigned talk-page messages, etc. On other wikis, they’re quite a bit less common, but some smaller wikis do make significant use of them.

This page holds some information, and helpful links, on creating and running bots:

https://www.mediawiki.org/wiki/Manual:Bots



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.