GSoC/GCI Archive
Google Code-in 2014 Wikimedia Foundation

Pywikibot script replicate_wiki global args support

completed by: murfel

mentors: Fabian, John Vandenberg

Pywikibot is a Python-based framework to write bots for MediaWiki. Seehttps://www.mediawiki.org/wiki/Manual:Pywikibot for more information. Patches can be submitted via Gerrit (you need a MediaWiki.org account). More documentation on Gerrit can be found athttps://www.mediawiki.org/wiki/Manual:Pywikibot/Gerrit. After you have successfully claimed this task in Google Melange please do use the task in Phabricator for communication instead of Google Melange. This allows more PWB developers to be reached! General development questions can be asked on the Pywikibot mailing list at https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l and the #pywikibot IRC channel (see https://www.mediawiki.org/wiki/MediaWiki_on_IRC).

The Pywikibot script named "replicate_wiki.py" uses argparse but does not use the Pywikibot function handle_args to process the global arguments that all Pywikibot scripts should recognise.  Global argument parsing needs to be added to the "replicate_wiki.py" script, and the 'script_tests' updated.  Another script (named "editarticle.py") already uses optparse/argparse and handle_args.  All other scripts also use handle_args in a consistent manner except for a very old script makecat.py.  See also: https://phabricator.wikimedia.org/T70664

Students are required to read Wikimedia's general instructions at https://www.mediawiki.org/wiki/Google_Code-in_2014#Instructions_for_GCI_students first.