Wikimedia

Pywikibot: Replace hard coded list of extensions in checkimages.py with site defined list

See https://phabricator.wikimedia.org/T120080 for more information!

https://github.com/wikimedia/pywikibot-core/blob/d616db5/scripts/checkimages.py#L1480 defined notallowed as ("xcf", "xls", "sxw", "sxi", "sxc", "sxd").

Instead of using this hard coded list, the list of allowed extensions provided by the server should be used. See https://commons.wikimedia.org/w/api.php?action=query&meta=siteinfo&siprop=fileextensions for the server provided list.

Pywikibot is a Python-based framework to write bots for MediaWiki. See https://www.mediawiki.org/wiki/Manual:Pywikibot for more information. See https://www.mediawiki.org/wiki/User:John_Vandenberg/GCI_walk-through for a short introduction to using Pywikibot. 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 ).

Task tags

  • python
  • pywikibot

Students who completed this task

murfel

Task type

  • code Code
close

2015