A bot to reupload images deleted at Commons as fair use candidates to local projects.
Python
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Commons_fair_use_upload_bot.py
README

README

Commons fair use upload bot re-uploads files that are deleted on
Commons to projects where they are in use, if those projects accept
non-free files. For details see:

https://commons.wikimedia.org/wiki/User:Commons_fair_use_upload_bot

Requires mwclient (tested with 0.6.5), available from:

http://sourceforge.net/projects/mwclient/

Add the directory containing the unpacked mwclient directory to your
PYTHONPATH.

It also requires a credentials file called
Commons_fair_use_upload_bot.credentials.txt of the form:

[mwclient]
username=Bot username
password=Bot password

On Toolserver, I run it regularly with the following cronie line:

46 * * * * cronsub -s Commons_fair_use_upload_bot PYTHONPATH=$HOME $HOME/Commons_fair_use_upload_bot/Commons_fair_use_upload_bot.py >> $HOME/Commons_fair_use_upload_bot/Commons_fair_use_upload_bot.out