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 Approved.
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)[reply]
Discussion
[edit]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)[reply]
- 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)[reply]
- 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 {{Category redirect}}. 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)[reply]
- I have a question on how a page like Category:Shia Imams should be managed. Must the hard redirect be kept or removed ? --Hercule (talk) 19:02, 8 September 2009 (UTC)[reply]
I have counted 789 redirected categories with interwiki --Hercule (talk) 20:17, 8 September 2009 (UTC)[reply]
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)[reply]
- 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. Approved for trial (20 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete. (that is, go ahead and do 20 "test edits") - Kingpin13 (talk) 07:14, 10 September 2009 (UTC)[reply]
- I will start the test edits with removing of hard redirect. --Hercule (talk) 19:43, 10 September 2009 (UTC)[reply]
- 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.
- Trial complete.
- --Hercule (talk) 21:17, 10 September 2009 (UTC)[reply]
- 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)[reply]
- 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 ). 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 ). 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)[reply]
- 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)[reply]
- 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)[reply]
- I will start the test edits with removing of hard redirect. --Hercule (talk) 19:43, 10 September 2009 (UTC)[reply]
Approved. 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)[reply]
- 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)[reply]
- 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.