Page MenuHomePhabricator

Replace hard coded list of extensions in checkimages.py with site defined list
Closed, ResolvedPublic

Description

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.

See b5b79ec57 for a similar improvement that was recently made to upload.py.

The last time this list was modified was in 2008 1bc7ef19 , removing djvu from the list when djvu support was added to Wikimedia wikis.

Mentor: @jayvdb
Medium difficulty

Note change https://gerrit.wikimedia.org/r/#/c/256387/ has a related modification, removing "xcf" from the list.

Event Timeline

jayvdb created this task.Dec 2 2015, 12:06 PM
jayvdb raised the priority of this task from to High.
jayvdb updated the task description. (Show Details)
jayvdb added subscribers: jayvdb, Xqt.
murfel claimed this task.Dec 10 2015, 6:36 AM

Change 258111 had a related patch set uploaded (by Murfel):
checkimages: use siteinfo fileextensions for allowed formats

https://gerrit.wikimedia.org/r/258111

Change 258111 merged by jenkins-bot:
checkimages: use siteinfo fileextensions for allowed formats

https://gerrit.wikimedia.org/r/258111

murfel closed this task as Resolved.Dec 10 2015, 8:51 AM