Wikipedia:Bots/Requests for approval/Anchor Link Bot
From Wikipedia, the free encyclopedia
- 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.
[edit] Anchor Link Bot
tasks • contribs • count • sul • logs • page moves • block user • block log • flag log • flag 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 Wikipedia:Manual_of_Style#Section_management.
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#Bar. 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: [1]. This is created per a request on WP:BOTREQ.
[edit] Discussion
Looks good. Just a few things:
- How are you making sure that a link isn't already there?
- What if that section in the linked-to article doesn't exist?
- What if there are actually two sections with the same name? Can the bot handle that?
- 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?
—METS501 (talk) 22:15, 23 June 2007 (UTC)
-
- 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. Approved for trial. 75 edits or so should be good. —METS501 (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 [2], which I've fixed [3] --Android Mouse 00:58, 24 June 2007 (UTC)
- OK, thanks for the answers. Approved for trial. 75 edits or so should be good. —METS501 (talk) 22:45, 23 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.