Wikipedia:Bots/Requests for approval/TPBot 2


 * 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 Symbol keep vote.svg Approved

TPBot 2
Operator:

Time filed: 03:09, Sunday April 22, 2012 (UTC)

Automatic, Supervised, or Manual: Automatic

Programming language(s): PHP

Source code available: here

Function overview: Adds a "title" to format=inline on the coords template if it does not already exist on the page. Also converts coor at dm, coor dm, coor dms, and coor at dms templates to coord.

Links to relevant discussions (where appropriate): Bot_requests

Edit period(s): Hourly

Estimated number of pages affected: coord is used on 760826 pages. The bot will review 60/hour.

Exclusion compliant (Yes/No): Yes

Already has a bot flag (Yes/No): Yes

Function details:

1. The bot checks for discontinued templates (coor at dm, coor dm, coor dms, and coor at dms) and converts them to coord

2. Bot checks to see if a format=title already exists.

3. If format=title does not exist, bot changes the first coord template found to include format=title (or format=inline,title).

Discussion
Your third point needs to be clearer. Which will it pick, when?

You're planning on running this for ten years?

Why can't this be pushed back into the template - what happens if two coords templates have intitle=true?

Why is the source code unavailable? Josh Parris 07:47, 24 April 2012 (UTC)
 * I'm not sure what you mean by your first question. As far as the other three, I can run it at any interval.  Two coord templates might not have the same coords.  So if two templates have "title" then they'll overlap.  You can see it here.  As far as the source, I've uploaded it here.--v/r - TP 14:47, 24 April 2012 (UTC)
 * I'm not sure whether the templates might appear multiple times on the page, but you might check the greediness of the regexes to avoid the .*'s gobbling up into other matches later in the page text. -- slakr \ talk / 00:57, 25 April 2012 (UTC)
 * I've updated the regex and tested them with multiple templates with a regex tester. On-wiki demonstration here.  Thanks for the heads up.  This is my first dip into regex and I was unaware they could be "greedy".--v/r - TP 02:08, 25 April 2012 (UTC)

The BOTREQ was only for one category (there may be others where it applies; to be determined). This shouldn't be done for all instances of Coord. Andy Mabbett ( Pigsonthewing ); Talk to Andy; Andy's edits 21:51, 27 April 2012 (UTC)

 MBisanz  talk 02:12, 26 April 2012 (UTC)
 * May I request an extension? I've exceeded the 100 edits (they go by fast, I'm sorry I didn't realize in time).  I'm now at ~190 edits.  I found quite a few problems during the trial that I had to test on fairly large test sample.  I believe I have the source code right now and I just need ~50 more edits to verify.  I've updated the source code on git.--v/r - TP 04:01, 10 May 2012 (UTC)

 MBisanz  talk 03:22, 11 May 2012 (UTC)
 * Thanks. Tests look good to me.  I'm ready to move forward.--v/r - TP 03:28, 11 May 2012 (UTC)

 MBisanz  talk 04:05, 11 May 2012 (UTC)
 * 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.