25 releases

0.5.1 May 6, 2023
0.5.0-alpha.4 Feb 20, 2023
0.4.3 Oct 15, 2022
0.4.0-alpha.4 May 2, 2022
0.3.2 Nov 22, 2021

#862 in Web programming

Download history 114/week @ 2023-02-14 71/week @ 2023-02-21 105/week @ 2023-02-28 142/week @ 2023-03-07 130/week @ 2023-03-14 114/week @ 2023-03-21 91/week @ 2023-03-28 80/week @ 2023-04-04 127/week @ 2023-04-11 159/week @ 2023-04-18 166/week @ 2023-04-25 242/week @ 2023-05-02 189/week @ 2023-05-09 122/week @ 2023-05-16 99/week @ 2023-05-23 124/week @ 2023-05-30

543 downloads per month

GPL-3.0-or-later

270KB
5K SLoC

A MediaWiki Bot framework

mwbot provides a batteries-included framework for building bots for MediaWiki wikis. The goal is to provide a high-level API on top of the mwapi and parsoid crates.

Configuration

Create a mwbot.toml file with the following structure:

api_url = "https://en.wikipedia.org/w/api.php"
rest_url = "https://en.wikipedia.org/api/rest_v1"

[auth]
username = "Example"
oauth2_token = "[...]"

See the documentation for how to get an OAuth 2 token. Using an owner-only consumer is the easiest way to do so.

You can alternatively use a BotPassword with:

[auth]
username = "Example"
password = "[...]"

Using Bot::from_default_config() will look in the current directory for mwbot.toml before looking in the user's config directory. A custom path can be specified by using Bot::from_config(...).

Contributing

mwbot is the flagship crate of the mwbot-rs project. We're always looking for new contributors, please reach out if you're interested!

Dependencies

~13–22MB
~430K SLoC