arkbot

Crates.ioarkbot
lib.rsarkbot
version0.3.0
sourcesrc
created_at2021-01-05 00:07:27.798942
updated_at2023-03-16 03:22:23.644406
descriptionA Rust rewrite (and complete redesign) of Arkanosis' Wikipedia bot
homepagehttps://github.com/Arkanosis/arkbot-rs
repositoryhttps://github.com/Arkanosis/arkbot-rs
max_upload_size
id331847
size86,293
Jérémie Roquet (Arkanosis)

documentation

https://github.com/Arkanosis/arkbot-rs

README

arkbot-rs License Build status

arkbot-rs is Rust rewrite (and complete redesign) of Arkanosis' Wikipedia bot.

The original Arkbot is made of a mix of Python, sed, awk and wget, glued together with some zsh, which has done the job for more than ten years now, but has never been really efficient.

arkbot-rs is designed from the start to address Arkbot's shortcomings, including:

  • performance,
  • need for manual intervention.

The goal is to have Arkbot running on a small server or VM (eg. on Toolforge) and performing its tasks on its own without any human intervention.

Usage

Usage: arkbot
       arkbot -h | --help
       arkbot --version

Options:
    -h, --help               Show this screen.
    --version                Show version.

Compiling

Run cargo build --release in your working copy.

Installing

Run sudo cp target/release/arkbot /usr/bin/arkbot in your working copy.

Configuring

Create ~/.config/arkbot/config.toml with the following content:

login = '$BOT_NAME'
password = '$BOT_PASSWORD'
server_url = 'https://fr.wikipedia.org'
script_path = '/w'
output_directory = '/tmp/.arkbot-data'

And replace $BOT_NAME with your bot account name and $BOT_PASSWORD with your bot account password. Please use a bot password created for arkbot-rs, and not the actual account password.

The output_directory will be created, but it's not used anymore and may disapear in a future version.

Enabling as a systemd service, run hourly

systemctl --user link systemd/arkbot.service systemd/arkbot.timer
systemctl --user daemon-reload
systemctl --user enable --now arkbot.timer

Arkbot will then check every hour if there is a new dump available. If there is one, it will download it and update the pages on the target wiki.

Warning: as of now, the target wiki and target pages are hardcoded, which makes arkbot-rs only suitable for the French Wikpedia.

Monitoring

You can check when arkbot-rs history using systemctl --user --list-timer.

You can read arkbot-rs logs using journalctl --user -u arkbot -f.

Contributing and reporting bugs

Contributions are welcome through GitHub pull requests.

Please report bugs and feature requests on GitHub issues.

License

arkbot-rs is copyright (C) 2020-2023 Jérémie Roquet jroquet@arkanosis.net and licensed under the ISC license.

Commit count: 57

cargo fmt