Tool:Arkivbot

From Wikitech
Toolforge tools
Website https://arkivbot.toolforge.org/
Description Bot for archiving pages at no.wikipedia.org
Keywords pywikibot
Maintainer(s) Danmichaelo (View all)
Source code https://github.com/danmichaelo/arkivbot
License MIT License
Admin log Tools.arkivbot/SAL

Arkivbot is a bot that archives pages at no.wikipedia.org using pywikibot. Logs can be viewed at https://arkivbot.toolforge.org/

Maintenance

Note: pywikibot credentials in ~/.pywikibot/user-config.py

$ ssh login.toolforge.org
$ become arkivbot

:# Update from github (authenticates using a password-less read-only deployment key in .ssh/id_rsa)
$ git pull

:# (Re)start the webservice
$ webservice restart

:# If changes have been made to jobs.yaml, load the new version
$ toolforge-jobs load jobs.yaml

:# Verify that jobs  have been loaded
$ toolforge-jobs list --long

:# Manually running the bot
$ toolforge-jobs run adhoc-job --command "./jobs/run.sh" --image tf-python39

: # Update to a new Python image (e.g. from Python 3.9 to 3.10):
$ toolforge-jobs run bootstrap-venv --command "./jobs/bootstrap-venv.sh" --image tf-python310 --wait
$ sed -i '' 's/tf-python39/tf-python310/' jobs.yaml
$ toolforge-jobs load jobs.yaml
$ sed -i '' 's/python3.9/python3.10/' service.template
$ webservice restart