GSoC/GCI Archive
Google Code-in 2014 Wikimedia Foundation

pywikibot: Reimplement LogpagesPageGenerator

completed by: Davis

mentors: John Vandenberg

Pywikibot (PWB) is a Python-based framework to write bots for MediaWiki. See https://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 at https://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).

Pywikibot is undergoing a rewrite which will be released as version 2.0, also called 'core'.  The majority of the code rewrite has been completed, and beta releases of the rewrite are functional and used by many bot operators on production wikis.  However some functionality from the old codebase has not been ported to the new codebase, which means Pywikibot users occasionally need to use the old codebase for some tasks.  The old codebase (called 'compat') can be found at http://git.wikimedia.org/summary/pywikibot%2Fcompat.git .

This task is to re-implement the LogpagesPageGenerator page generator from the 'compat' codebase into the 'core' codebase, and add the command line arguments so it can be used to as an input for scripts.   To complete this task, a unit test needs to be added to "tests/pagegenerators_tests.py" to simulate calling LogpagesPageGenerator from the command line.  An example unit test is test_newpages_default .

The Phabricator task is https://phabricator.wikimedia.org/T76555 .