The following discussion is an archived debate. Please do not modify it. To request review of this BRFA, please start a new section at WT:BRFA. The result of the discussion was Approved.

Operator: Basilicofresco (talk · contribs)

Automatic or Manually assisted: automatic

Programming language(s): python

Source code available: ask me

Function overview: checking and fixing lowcase wikilinks to uppercase sections.

Links to relevant discussions (where appropriate):

Edit period(s): monthly

Estimated number of pages affected: 1800 (rough guess)

Exclusion compliant (Y/N): Y

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

Function details: wikilinks to sections are case sensitive (eg.#discussion vs. #Discussion). Strategy:

  1. Bot looks within the dump for lowcase wikilinks to a sections (eg. [[sonar#history]])
  2. checks the page (eg. "sonar") for the existence of the lowcase section (eg. "history")
  3. if it does not exist, it checks for the uppercase alternative (eg. "History")
  4. if it exists, bot fixes the wikilink (eg. [[sonar#History]])

Discussion

[edit]

I presume that you won't be fixing interiwki links.

I've come across a number of situations where the link has had a case sensitivity problem but not with the first letter; will the bot check for a case-insensitive match, or just adjust the first letter?

My concern is that there may be some situation where mis-linking to a #section is preferable to changing the case to match an existing section - but I can't think of what that may be. Please raise this BRFA at WP:VPR where someone might think of how this could be a bad idea. Josh Parris 01:33, 28 February 2010 (UTC)[reply]

It will check only the first letter: checking for any case error within the section name would need a completely different and much more complex approach. Of course it will not affect interwiki links. I was not able to find any potential problem in fixing these links and on it.wiki I did not receive any complaints... however you are right, I raised this page at the village pump proposals. -- Basilicofresco (msg) 10:14, 28 February 2010 (UTC)[reply]

WikiProject Red Link Recovery would be interested in a list of broken section links that the bot can find but not fix (even though such links are not actually red). We have the manpower to start fixing them manually, but not to find them all. Certes (talk) 14:00, 28 February 2010 (UTC)[reply]

You'll love Category:Pages containing links with bad anchors then. Josh Parris 14:24, 28 February 2010 (UTC)[reply]
Thanks, that's exactly what we needed, and pleasingly short. Certes (talk) 15:32, 28 February 2010 (UTC)[reply]
I think that those pages with a broken #section link that can't be repaired ought to end up in Category:Pages containing links with bad anchors - but this could add a great deal of complexity to your bot; you could tag their talk page with ((User:WildBot/tag)), and WildBot could then come and tag the page, replacing that with its own tag listing the broken #sections (and dumping it into Category:Pages containing links with bad anchors until the link is fixed, when it gets removed automatically). What do you think? Josh Parris 01:37, 2 March 2010 (UTC)[reply]
I'm not sure it's completely a good idea. First of all my bot is not designed to keep the box "up to date and then remove it when the links are fixed". Moreover my goal was to find without any false positive existing uppercased sections (and then fix the link). It's a bit different matter to find without any false positive not existing sections. At the moment if I skip an existing section (due Template:Anchor, odd sintax, etc) it is not a problem, but if I add also Category:Pages containing links with bad anchors it is a mistake. -- Basilicofresco (msg) 07:38, 3 March 2010 (UTC)[reply]
You seem to have misunderstood; if you tag the talk-page with ((User:WildBot/tag)), that's all you need to do. WildBot will remove it, then evaluate the page to see if there are any explanations like you suggested - anchor tags, weird markup, and so on - and if not, tag it as being broken. You need only add ((User:WildBot/tag)) to the talk page, WildBot will do everything else. Does that seem okay? Josh Parris 07:49, 3 March 2010 (UTC)[reply]
Oh, I understand now. Great, I will do it! -- Basilicofresco (msg) 11:06, 3 March 2010 (UTC)[reply]

Approved for trial (30 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete. as there hasn't been even a peep of objection, let's see how the code runs in the real world. Josh Parris 06:36, 4 March 2010 (UTC)[reply]

I have to put ((Template:User:WildBot/tag)) because with ((User:WildBot/tag)) the template does not appear. Are you going to move the template to Template:WildBot/tag? -- Basilicofresco (msg) 13:35, 4 March 2010 (UTC)[reply]
I created the template in the wrong namespace! I've moved it to ((User:WildBot/tag)) now. My apologies. Josh Parris 13:46, 4 March 2010 (UTC)[reply]

Improvements:

Basilicofresco (msg) 14:37, 4 March 2010 (UTC)[reply]

30 edits trial completed. -- Basilicofresco (msg) 15:31, 4 March 2010 (UTC)[reply]

Probably an extended trial would be useful to better evaluate the last script version. -- Basilicofresco (msg) 18:13, 4 March 2010 (UTC)[reply]

I'm happy with what I've seen thus far. If you'd like to take the functionality for another run, feel free: Approved for trial (50 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete. (If you'd like something longer, just ask) Josh Parris 10:03, 5 March 2010 (UTC)[reply]
50 edits done, everything seems fine. -- Basilicofresco (msg) 15:59, 5 March 2010 (UTC)[reply]
Trial complete. -- Basilicofresco (msg) 08:13, 6 March 2010 (UTC)[reply]
Edits look impressive. I'll probably approve this later if there are no complaints, and someone else doesn't get there first :). - Kingpin13 (talk) 08:29, 6 March 2010 (UTC)[reply]
I'm as happy with this run as I was the last. Congratulations. Josh Parris 09:21, 6 March 2010 (UTC)[reply]

 Approved. After two satisfactory trials. Josh Parris 13:16, 6 March 2010 (UTC)[reply]

The above discussion is preserved as an archive of the debate. Please do not modify it. To request review of this BRFA, please start a new section at WT:BRFA.