Wikimedia
In Pywikibot's download_dump.py file, add a progress bar
Pywikibot is a Python-based framework to write bots for MediaWiki (more information).
Thanks to work in Google Code-in, Pywikibot now has a script called download_dump.py
. It downloads a Wikimedia database dump from http://dumps.wikimedia.org/, and places the dump in a predictable directory for semi-automated use by other scripts and tests.
This script downloads big files, a progress bar or another indicator can be really useful.
You must avoid using external libraries for this. For reference, please read:
- https://stackoverflow.com/a/15645088/2603230
- https://stackoverflow.com/q/3160699/2603230
- https://stackoverflow.com/questions/3160699/python-progress-bar
- https://github.com/wikimedia/pywikibot/blob/master/pywikibot/page.py#L2686-L2693
It would be even better if something like 105.2M/2.1G
can be shown alongside the progress bar. (Not required)
You are expected to provide a patch in Wikimedia Gerrit. Documentation on Gerrit is available.
Task tags
Students who completed this task
Ryan Chang