#wiki #networking #mediawiki

app mwkeep

A tool for house keeping MediaWiki sites

2 releases

0.0.1 Jul 15, 2024
0.0.0 Jul 14, 2024

#28 in #mediawiki

GPL-3.0-or-later

27KB
624 lines

MwKeep - A bot for housekeeping MediaWiki instances

Usage: ./target/release/mwkeep [OPTIONS]

Options: -h, --help : Show help message (this message) -v, --verbose : Show verbose messages during execution -t, --dry-run : Dry run -d=DATA_DIR, --data-dir=DATA_DIR : Set data directory path to DIRECTORY Default DATA_DIR is current directory.

Configuration: Configuration file is located at DATA_DIR/config.toml . Example config.toml is as follows:

username = "UserBot@HouseKeeping" password = "(secret)" domains = [ "example1.miraheze.org", "example2.miraheze.org" ] keep_alive_title = "KeepAlive" keep_alive_text = "keep alive --~~~~" keep_alive_summary = "keep alive" keep_alive_days = 30 delete_title = "DeletedPage" keep_days = 14

By this configuration: * This bot write to page KeepAlive if 30 days passed since last edit on the wiki instance. * This bot delete pages which content is exactly same as [[DeletedPage]] if the page is not edited for 14 days.

Execute this bot dayly by cron, for example setting: 0 3 * * * cd /home/user/mwkeep && /home/user/mwkeep/target/release/mwkeep

Note that application state is saved to DATA_DIR/state.toml .

Dependencies

~12–24MB
~341K SLoC