Crates.io | mwkeep |
lib.rs | mwkeep |
version | 0.0.1 |
source | src |
created_at | 2024-07-14 23:11:36.200338 |
updated_at | 2024-07-15 00:08:44.682445 |
description | A tool for house keeping MediaWiki sites. |
homepage | https://tyatsumi.gitlab.io/mwkeep/ |
repository | https://gitlab.com/tyatsumi/mwkeep/ |
max_upload_size | |
id | 1303320 |
size | 76,485 |
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 .