Wikipedia:Bots/Requests for approval/HerculeBot 2


 * The following discussion is an archived debate. Please do not modify it. Subsequent comments should be made in a new section. The result of the discussion was Symbol keep vote.svg Approved.

User:HerculeBot 2
Operator: Hercule

Automatic or Manually assisted: Automatic

Programming language(s): Standard pywikipedia for interwiki fixing, Java custom code to change category page

Source code available:

Function overview: I'd like to implement here a task I created on fr.wikipedia. The goal is to fix interwikis of redirected categories

Edit period(s): once a week, if needed

Estimated number of pages affected: on french Wikipedia the first run revealed that 10% of the category must be corrected. So here, with the same ratio it should impact about 800 pages for the first run.

Exclusion compliant (Y/N): No, doesn't seem revelant for this task

Already has a bot flag (Y/N): Y

Function details: Java part : The bot is looking for all pages of Category:Wikipedia category redirects that have interwiki links. This is an anomaly, because the interwikis should be on redirect target. When a category is founded, the bot register it in a local file, to post-processing interwiki fixing. The page is changed, to just include the redirection template (ie interwikis and other text is removed). This is the only changes done on this wikipedia. Pywikipedia part : I launch interwiki.py on the log file, to correct interwikis. Like this the errors of interwikis should not be done again by interwiki bot.

I hope my request is clear, feel free to ask me more explaination, I come frequently to read this page.

Regards

--Hercule (talk) 09:45, 8 September 2009 (UTC)

Discussion
Hi, sounds like a sensible task. If I understand, the end result will be having the interwiki links moved from the redirect page, to the redirect target? However, you say you will remove all the text on the redirect page, except from the actual redirect. Would it be possible to only remove the interwiki links. As removing other text could result in redirect templates being removed - Kingpin13 (talk) 15:15, 8 September 2009 (UTC)
 * Okay, or when you say "redirect template", do you actually mean the redirect templates, and the actual redirect text? - Kingpin13 (talk) 15:16, 8 September 2009 (UTC)
 * My bot won't move the interwikis to the target place. I suppose the redirect target is a copy of the redirected category and then already have the interwikis.
 * I will only manage categories with . I didn't saw you had also some templates for these pages, like in Category:Middle-earth places. So I will modify my script to make him only remove interwikis from pages. I take not about this. I only manage page using template, a if a category is a hard redirect I won't manage it (actually the interwikis bots must already find the right category.
 * I propose to make 5 test edits, in order you can see the result. Are you OK for a test ? --Hercule (talk) 18:57, 8 September 2009 (UTC)
 * I have a question on how a page like should be managed. Must the hard redirect be kept or removed ? --Hercule (talk) 19:02, 8 September 2009 (UTC)

I have counted 789 redirected categories with interwiki --Hercule (talk) 20:17, 8 September 2009 (UTC)

It looks like the pages should only have the template on it, as the categories have changed. I think I understand what this bot is for, it's to clean up the mess left behind by changing category names and interwiki links not moved. Would seeing 5 test edits make it clearer for others? I think it might. I don't understand categories well enough to catch pitfalls, but I think others might catch possible problems if they saw the type of edits this bot is intended to make. --69.225.12.99 (talk) 06:48, 10 September 2009 (UTC)
 * The soft redirect template is better than the hard redirect. But it's okay to keep them as hard redirects, treat them in the same way as the soft ones. (that is, go ahead and do 20 "test edits") - Kingpin13 (talk) 07:14, 10 September 2009 (UTC)
 * I will start the test edits with removing of hard redirect. --Hercule (talk) 19:43, 10 September 2009 (UTC)
 * Well, the removal of hard redirect doesn't work. As it's not important I will forget it :p. The 20th test edit was wrong because I forgot one line when removing the hard redirect fixing. So I did one more.
 * --Hercule (talk) 21:17, 10 September 2009 (UTC)
 * Hey, sorry it's taken me so long to get back to you. What was this edit? Also, it seems another bot added a load after your bot removed them (see here). Would it be at all possible to check the category which is redirected to (the target of the redirect) and add the removed interwikis there? I know you said that wasn't what you aimed to do, but it would be more helpful, IMO - Kingpin13 (talk) 15:01, 16 September 2009 (UTC)
 * This edit was the one I talk about in my last sentence : I removed the hard redirect management and did a code mistake. It's nom fixed.
 * For the problem of adding interwikis, I'm not sure it would be a good idea. For Category:Actresses for exemple, the french cat is fr:Category:Actrice, but for the target (Category:Actors) it's fr:Category:Acteur). So adding fr:Category:Actrice to Category:Actors would be wrong.
 * I think I might add in the Java code a check to find interwikis of the redirected category that doesn't appear in the target category (so I will find fr:Category:Actrice different of fr:Category:Acteur). Then I'll update the interwikis (eg fr:Category:Actrice) to remove this interwiki, like if the page would be deleted. Maybe some cases will still appear, but it then could be managed manually.
 * When all the categories will be cleaned I'll launch my bot once a week or once a mounth. I should then be able to check manually the fixed categories, and verify if a bot didn't add again the interwikis. I'll correct them manually.
 * Unfortunatly these improvements won't be demonstrable here because the englsh pages won't be edited :p
 * --Hercule (talk) 15:36, 16 September 2009 (UTC)
 * Well, I did two more test edits. All seem Ok with redirect correction. I have an output of fix done in Java, so these will be check manually. It might be for few cases, and can request complex decisions, needing a human mind :p
 * Are you now Ok for this task ? --Hercule (talk) 20:37, 17 September 2009 (UTC)
 * Are you now Ok for this task ? --Hercule (talk) 20:37, 17 September 2009 (UTC)

Task has been done on another wiki with no complaints (if I understand correctly). Those interwikis aren't doing us any good. Note that I'm not responsible for what this bot does on different sites, so make sure you have approval there (I saw somewhere that you have global bot status, but mabbes that was another bot) - Kingpin13 (talk) 20:49, 17 September 2009 (UTC)
 * I'm global bot and approved for interwiki fixing quite everywhere, so there's no problem. Thanks for all --Hercule (talk) 20:56, 17 September 2009 (UTC)
 * The above discussion is preserved as an archive of the debate. Please do not modify it. Subsequent comments should be made in a new section.