https://bugzilla.wikimedia.org/show_bug.cgi?id=55086
Web browser: --- Bug ID: 55086 Summary: Make commonscat.py use deletion summaries Product: Pywikibot Version: unspecified Hardware: All OS: All Status: ASSIGNED Severity: enhancement Priority: Unprioritized Component: General Assignee: Pywikipedia-bugs@lists.wikimedia.org Reporter: legoktm.wikipedia@gmail.com Classification: Unclassified Mobile Platform: ---
Originally from: http://sourceforge.net/p/pywikipediabot/feature-requests/192/ Reported by: multichill Created on: 2009-05-01 12:51:59 Subject: Make commonscat.py use deletion summaries Assigned to: multichill Original description: If an category at Commons gets renamed and the original category gets deleted commonscat is not able to find the new category. Commonscat should have another function which checks the deletion summary for the new category name. This deletion summary can be pulled from the api, see for example:
http://commons.wikimedia.org/w/api.php?action=query&list=logevents&l...
If a correct destination category is found, the bot should use this. This function should probably be last resort (after checking the interwiki's for a possible link).
https://bugzilla.wikimedia.org/show_bug.cgi?id=55086
Kunal Mehta (Legoktm) legoktm.wikipedia@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://sourceforge.net/p/p | |ywikipediabot/feature-reque | |sts/192
https://bugzilla.wikimedia.org/show_bug.cgi?id=55086
Maarten Dammers maarten@mdammers.nl changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED CC| |maarten@mdammers.nl Resolution|--- |FIXED
--- Comment #1 from Maarten Dammers maarten@mdammers.nl --- Looks like this was implemented some time ago, but bug not closed. Relevant snipped:
if not commonsPage.exists(): logpages = commonsSite.logpages(mode='delete', title=commonsPage.title()) try: logitem = logpages.next() (logpage, loguser, logtimestamp, logcomment) = logitem # Some logic to extract the target page. regex = u'moved to [[:?Category:(?P<newcat1>[^|}]+)(|[^}]+)?]]|Robot: Changing Category:(.+) to Category:(?P<newcat2>.+)' m = re.search(regex, logcomment, flags=re.I) if m: if m.group('newcat1'): return self.checkCommonscatLink(m.group('newcat1')) elif m.group('newcat2'): return self.checkCommonscatLink(m.group('newcat2')) else: pywikibot.output( u'getCommonscat: Deleted by %s. Couldn't find move target in " %s "' % (loguser, logcomment)) return u'' except StopIteration: if pywikibot.verbose: pywikibot.output( u"getCommonscat: The category doesnt exist and nothing found in the deletion log.") return u''
https://bugzilla.wikimedia.org/show_bug.cgi?id=55086
Ricordisamoa ricordisamoa@openmailbox.org changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |ricordisamoa@openmailbox.or | |g Component|General |Other scripts
pywikipedia-bugs@lists.wikimedia.org