Wikipedia:Bots/Requests for approval/GreenC bot 13


 * 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

GreenC bot 13
Operator:

Time filed: 00:24, Wednesday, April 3, 2019 (UTC)

Automatic, Supervised, or Manual: automatic

Programming language(s): GNU Awk and BotWikiAwk framework

Source code available: Yes

Function overview: Convert instances of  to either   or   as appropriate to the topic of the article where the wikilink occurs.

Links to relevant discussions (where appropriate): Bot_requests

Edit period(s): one time

Estimated number of pages affected: ~ 15,000

Exclusion compliant (Yes/No): Yes

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

Function details: Find all articles containing  (or with a pipe) and check page categories to determine if it should link to   or. If the strings "baseball" and "cricket" both appear in an article skip and log. In terms of generating the target article list, for cricket check for: Category:Cricketers, Category:Seasons in cricket and Category:Years in cricket (about 3k links). For baseball: Category:Baseball players, Category:Seasons in baseball, Category:Years in baseball (about 12k links).

Discussion

 * -- Green  C  00:33, 3 April 2019 (UTC)
 * you wrote that the bot does not have a bot flag, but it appears to have a bot flag - can you clarify? Thanks, --DannyS712 (talk) 00:32, 3 April 2019 (UTC)
 * Typo, fixed. -- Green  C  00:33, 3 April 2019 (UTC)
 * also, what do you mean by If categories in both skip and log - is this supposed to be if in both categories? --DannyS712 (talk) 00:36, 3 April 2019 (UTC)
 * Actually I adjusted per BOTREQ discussion, string anywhere in the article not just category. -- Green  C  01:15, 3 April 2019 (UTC)
 * I thought I'd do some preliminary checks on this proposed solution. I ran through the first 10% of the 12k baseball players which link to Batting average in AWB, searching for "cricket". I found 2 categories Category:Battle Creek Crickets players and Category:Binghamton Cricket players which are for baseball teams with "cricket" in their title. I'll do these via AWB now so they hopefully don't get caught up in the Bot run. I did find 1 proper mention of cricket (a baseball player from Bahamas who also played cricket in his youth), which I've manually processed. I'll try the same but for cricket players. Spike &#39;em (talk) 10:30, 9 April 2019 (UTC)
 * The first 1k cricketers threw up 6 or so articles which contain "baseball", some just in hat-notes, so between the groups there is less than 1% that may need manual checks. Spike &#39;em (talk) 10:56, 9 April 2019 (UTC)
 * The bot will catch/log/skip these if it sees the word "baseball" and "cricket" anywhere in the wiki source (article, top hats, categories etc..) -- Green  C  14:06, 9 April 2019 (UTC)


 * Not sure if you've dealt with this already, but I think it should be replacing  with   or   Mmitchell10 (talk) 09:42, 6 April 2019 (UTC)
 * This is the purpose of the bot. -- Green  C  18:58, 7 April 2019 (UTC)
 * At the moment it says it will replace  with , whereas it should be replacing it with  . I'm just flagging that we need to make sure we don't change the text that appears. But maybe that's obvious/implicit and I'm being too picky! Mmitchell10 (talk) 19:33, 8 April 2019 (UTC)
 * Yeah sorry thought it was evident, it will be obvious what it does if it had permission to do a trial run :) -- Green  C  20:31, 8 April 2019 (UTC)


 * Also, we don't want to upset the capitalisation, so need to replace Batting with Batting, and batting with batting. Mmitchell10 (talk) 09:42, 6 April 2019 (UTC)
 * That is what is does. -- Green  C  18:57, 7 April 2019 (UTC)
 * This is WP:CONTEXTBOT, but a well-constrained one. Let's trial. &#32; Headbomb {t · c · p · b} 05:08, 9 April 2019 (UTC)


 * A few more piped terms to add to the search and replace :  and    to   and   to   Spike &#39;em (talk) 16:21, 9 April 2019 (UTC)
 * Ah just saw this, posted the same question on your talk page :) Ok can convert these then. -- Green  C  16:40, 9 April 2019 (UTC)


 * - Diffs. -- Green  C  17:03, 9 April 2019 (UTC)
 * The edit summaries for the first 45 were a little off, fixed in the final 5 edits. Otherwise see no problem, but appreciate anyone taking a look. -- Green  C  17:03, 9 April 2019 (UTC)
 * Looks good to me. What happens if you run across things like Category:Battle Creek Crickets players? &#32; Headbomb {t · c · p · b} 17:10, 9 April 2019 (UTC)
 * The bot will detect the article contains both strings "baseball" and "cricket" then log and skip. Spike'em estimates there might be 1% like this which is doable for manual context edits. -- Green  C  17:28, 9 April 2019 (UTC)
 * Then let's try to break the bot and see if it makes any edits there. &#32; Headbomb {t · c · p · b} 17:44, 9 April 2019 (UTC)

Done, no edits made.


 * Clint Rogge  error Contains baseball and cricket
 * Clint Rogge  error : batting average wikilink not found
 * Pat Duncan (baseball)  error Contains baseball and cricket
 * Pete Fahrer  error Contains baseball and cricket
 * Pat Duncan (baseball)  error : batting average wikilink not found
 * Pete Fahrer  error : batting average wikilink not found
 * Oscar Graham  error Contains baseball and cricket
 * Oscar Graham  error : batting average wikilink not found
 * Harry LaRoss  error Contains baseball and cricket
 * Dutch Zwilling  error Contains baseball and cricket
 * Ray Brubaker  error Contains baseball and cricket
 * Charlie Krause  error Contains baseball and cricket
 * Larry Gilbert (baseball)  error Contains baseball and cricket
 * Ray Brubaker  error : batting average wikilink not found
 * Charlie Krause  error : batting average wikilink not found
 * Wese Callahan  error Contains baseball and cricket
 * Wese Callahan  error : batting average wikilink not found
 * Baby Doll Jacobson  error Contains baseball and cricket
 * Harry LaRoss  error : batting average wikilink not found
 * Dutch Zwilling  error : batting average wikilink not found
 * Garland Nevitt  error Contains baseball and cricket
 * Garland Nevitt  error : batting average wikilink not found
 * Baby Doll Jacobson  error : batting average wikilink not found
 * Grover Hartley  error Contains baseball and cricket
 * Bill Culp  error Contains baseball and cricket
 * Bill Culp  error : batting average wikilink not found
 * Katsy Keifer  error Contains baseball and cricket
 * Pete Compton  error Contains baseball and cricket
 * Katsy Keifer  error : batting average wikilink not found
 * Pete Compton  error : batting average wikilink not found
 * Larry Gilbert (baseball)  error : batting average wikilink not found
 * Grover Hartley  error : batting average wikilink not found
 * Hardy Richardson  error Contains baseball and cricket
 * Hardy Richardson  error : batting average wikilink not found
 * Art Allison  error Contains baseball and cricket
 * Art Allison  error : batting average wikilink not found
 * John Morrissey (baseball)  error Contains baseball and cricket
 * John Morrissey (baseball)  error : batting average wikilink not found
 * Buttercup Dickerson  error Contains baseball and cricket
 * Buttercup Dickerson  error : batting average wikilink not found
 * Bobby Clack  error Contains baseball and cricket
 * Bobby Clack  error : batting average wikilink not found
 * Bill Smiley  error Contains baseball and cricket
 * Bill Smiley  error : batting average wikilink not found
 * Blondie Purcell  error Contains baseball and cricket
 * John Richmond (shortstop)  error Contains baseball and cricket
 * Blondie Purcell  error : batting average wikilink not found
 * John Montgomery Ward  error Contains baseball and cricket
 * Frank Heifer  error Contains baseball and cricket
 * John Montgomery Ward  error : batting average wikilink not found
 * Frank Heifer  error : batting average wikilink not found
 * Harry Arundel  error Contains baseball and cricket
 * John Richmond (shortstop)  error : batting average wikilink not found
 * Harry Arundel  error : batting average wikilink not found
 * Jim Whitney  error Contains baseball and cricket
 * John Shoupe  error Contains baseball and cricket
 * Horace Phillips (baseball)  error Contains baseball and cricket
 * John Shoupe  error : batting average wikilink not found
 * Horace Phillips (baseball)  error : batting average wikilink not found
 * Ed Kennedy (outfielder)  error Contains baseball and cricket
 * Ed Kennedy (outfielder)  error : batting average wikilink not found
 * Jim Whitney  error : batting average wikilink not found
 * John McGuinness (baseball)  error Contains baseball and cricket
 * John McGuinness (baseball)  error : batting average wikilink not found
 * Hal McClure  error Contains baseball and cricket
 * Hal McClure  error : batting average wikilink not found
 * Pop Smith  error Contains baseball and cricket
 * Pop Smith  error : batting average wikilink not found

-- Green  C  18:07, 9 April 2019 (UTC)
 * I checked through a reasonable set of them and they look good to me too. Spike &#39;em (talk) 10:40, 10 April 2019 (UTC)

Looks like everything's been considered. Primefac (talk) 21:14, 27 April 2019 (UTC)
 * -- Green  C  19:30, 9 April 2019 (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.