This repository contains the code for User:MajavahBot, which operates on many Wikimedia wikis, including the English, Finnish Wikipedias and the Wikimedia Meta-Wiki. Its bugs are tracked on the Wikimedia Phabricator. The bot is hosted on Wikimedia Toolforge.
The bot uses Python 3. It is currently running 3.5 in production. Clone this repository and create a virtual environment. Use pip to install dependencies from requirements.txt
.
The bot has a configuration file majavahbot/config.py
and a sample one at majavahbot/config.example.py
. To get started, copy the sample file over and modify any values that need modifying. It contains two types of values:
{DB}
to properly connect to the right database) and the path to a configuration file containing a username and a password (sample format is provided at local.my.cnf
and Toolforge has this directly provided to you).The cli.py
file can be used to run the bot. Use python cli.py --help
to retrieve a list of all subcommands and python cli.py {subcommand} --help
to get help related to that specific subcommand.
The source code lives on majavahbot/
. It is divided on three parts:
majavahbot/api/
contains a framework that the rest of the bot uses.majavahbot/tasks/
contains the individual tasks that the bot can run.There is also cli.py
, which handles the command-line interface for running the bot.
majavah-bot is free software licensed under the MIT license. See LICENSE for more details.