Tool to download thumbnails of files from Wikimedia Commons
This tool can be used either by passing the filenames, a category or by using a file list.
Just list the files we want to download.
download_from_Wikimedia_Commons Example.jpg Example_ka.png
Just list the files we want to download.
download_from_Wikimedia_Commons --category Example_images
The file list must be formated as following, with one file per line, and filename,width
:
Example.jpg,100
Example ka.png,80
Then use the --list
argument:
download_from_Wikimedia_Commons --list list.txt
By default, the tool downloads the files in the current directory.
This can be changed using the --output
flag with a valid path.
download_from_Wikimedia_Commons Example.jpg --output some/path/
You can set the width of the thumbnail by using the --width
argument:
download_from_Wikimedia_Commons Example.jpg --width 50
By default, the tool display basic information its logs (through logging
).
You can adjust the verbosity level with the -v
and -q
flags:
use -v
to display DEBUG-level messages, -q
to silence INFO-level messages.
Easiest way to install is to use pip
from the Python Package Index:
pip install CommonsDownloader
Alternatively, you can clone the repository and install it using setuptools
:
python setup.py install
This will install the executable script download_from_Wikimedia_Commons