Wikipedia:Bots/Requests for approval/Anchor Link Bot


 * 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.

Anchor Link Bot
Operator: Android Mouse

Automatic or Manually Assisted: Automatic

Programming Language(s): C

Function Summary: This bot will insert a comment if a section is linked from another article, per Manual_of_Style.

Edit period(s) (e.g. Continuous, daily, one time run):

Edit rate requested: 7 edits per Minute

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

Function Details: From a database dump, the bot scans and finds internal links that use anchors, ex Foo. From there it checks if the section 'Bar' on the article 'Foo' has comment that another article links directly to that section. It only adds comments if both the linked page and the page containing the section are on the main space. Here is an example diff:. This is created per a request on BOTREQ.

Discussion
Looks good. Just a few things: — M ETS 501 (talk) 22:15, 23 June 2007 (UTC)
 * 1) How are you making sure that a link isn't already there?
 * 2) What if that section in the linked-to article doesn't exist?
 * 3) What if there are actually two sections with the same name? Can the bot handle that?
 * 4) Will the bot combine the comments if there is more than one article linking to a section, or will it just put several comments one after the other?
 * It will scan for any occurance of the article name on the same or direclty next line of where the start of the section is. If the article name is in either of those lines it should skip it.
 * It skips the article. I was thinking about having it notify of the broken link on the article's talk page, but decided against it.
 * I hadn't thought of that, thanks for bring it up. Currently it would put a notice on the first occurance of that section name. But in order to avoid possible errors, I'll have it skip the article if this occurs.
 * I currently took the cop-out approach--it should skip the article entirely if there is any comment on the same line or directly next line of where the section starts. I was going to have it simply append "and Article name " to the end of the comment but I'm not sure how I could easily have it recognize if the comment is actually a list of linked articles or something entirely unreleated.
 * --Android Mouse 22:38, 23 June 2007 (UTC)
 * OK, thanks for the answers.  75 edits or so should be good. — M ETS 501 (talk) 22:45, 23 June 2007 (UTC)
 * ~75 edits done. Please disregard the first 5 or so edits that the bot made since I was still changing around code. Besides those edits, the only other error was, which I've fixed --Android Mouse 00:58, 24 June 2007 (UTC)


 * --ST47 Talk 14:13, 25 June 2007 (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.