Last modified: 2014-09-09 02:23:06 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T68312, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 66312 - Update imageuncat.py to focus on categories
Update imageuncat.py to focus on categories
Status: PATCH_TO_REVIEW
Product: Pywikibot
Classification: Unclassified
Other scripts (Other open bugs)
core-(2.0)
All All
: Unprioritized enhancement
: ---
Assigned To: Maarten Dammers
https://git.wikimedia.org/blob/pywiki...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-06-07 10:07 UTC by Maarten Dammers
Modified: 2014-09-09 02:23 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Maarten Dammers 2014-06-07 10:07:54 UTC
imageuncat.py was written in the time we didn't have proper access to the list of categories using the api. So we had to parse the page text for categories, but that didn't catch categories added by template. So it contains quite a bit of trickery to work around this problem.

Now we do have proper api access a proper implementation becomes possible:
* Loop over templates to see if doesn't contain a template to skip (like nominated for deletion). This should include template redirects
* Loop over the categories. 
* Check for each category if it's hidden
* If you find a category that is not hidden, break
* If you finish without finding a category that's not hidden -> tag it

It's should be written with a Class (instead of the different functions we have right now). 

We probably want to add a bit of caching of the categories at https://commons.wikimedia.org/wiki/Special:MostLinkedCategories so we don't have to look these up a gazillion times.
Comment 1 Gerrit Notification Bot 2014-06-09 20:35:29 UTC
Change 138453 had a related patch set uploaded by Multichill:
(bug 66312) Rewrite imageuncat.py

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

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links