Wikipedia:Bots/Requests for approval/BU RoBOT
- 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: BU Rob13 (talk · contribs · SUL · edit count · logs · page moves · block log · rights log · ANI search)
Time filed: 03:49, Thursday, August 13, 2015 (UTC)
Automatic, Supervised, or Manual: Automatic
Programming language(s): AWB
Source code available: AWB, see below
Function overview: Replace small text footnote in articles containing Template:Infobox NFL player with a new parameter to comply with WP:FONTSIZE and standardize the appearance of the footnote.
Links to relevant discussions (where appropriate): Template_talk:Infobox_NFL_player#WP:FONTSIZE_issue
Edit period(s): One time run
Estimated number of pages affected: 3,851
Exclusion compliant (Yes/No): Yes
Already has a bot flag (Yes/No): No
Function details: To comply with WP:FONTSIZE and achieve consistency in how a common footnote is applied, the following strings of text within templates, so long as they are followed by white space and a vertical bar:
:<small>*Offseason and/or practice roster member only</small> :{{small|*Inactive and/or offseason member only}} :<small>*Offseason and/or practice squad member only</small> :{{small|*Offseason and/or practice squad member only}} :<small>* Offseason and/or practice squad only</small> :<small>*Inactive and/or practice squad member only</small>
Will be replaced with:
|pastteamsnote = yes
The regex strings are:
\:\<small\>\*Offseason and\/or practice roster member only\<\/small\>(?=\s*\|) \:\{\{small\|\*Inactive and\/or offseason member only\}\}(?=\s*\|) \:\<small\>\*Offseason and\/or practice squad member only\<\/small\>(?=\s*\|) \:\{\{small\|\*Offseason and\/or practice squad member only\}\}(?=\s*\|) \:\<small\>\* Offseason and\/or practice squad only\<\/small\>(?=\s*\|) \:\<small\>\*Inactive and\/or practice squad member only\<\/small\>(?=\s*\|)
Discussion
[edit]- I completed around 150 edits using two of the most common of those strings, and no errors popped up. These can be found in my contributions. ~ RobTalk 03:49, 13 August 2015 (UTC)[reply]
- You should probably always check if it's the last item inside the parameter, or you'd risk losing some of their career info. Alakzi (talk) 07:34, 13 August 2015 (UTC)[reply]
- @Alakzi: Having looked through probably 500 of these pages and doing my semi-automated "trial", I've encountered no articles that have the footnote in the middle of their career history. I could add "(?!\s\*)" to the end of each string being looked for in an attempt to pick up any articles that had a list of teams, stuck the footnote in the middle, then continued the list. Would that address your concern, or am I misunderstanding it? ~ RobTalk 07:51, 13 August 2015 (UTC)[reply]
- It would, but it would also be safer to check if the footnote is followed by anything except whitespace, newlines and a vertical bar. Alakzi (talk) 07:55, 13 August 2015 (UTC)[reply]
- This is my first time working with regex, so apologies for my lack of knowledge, but "(?=\s*\|)" would work as you described, correct? ~ RobTalk 08:40, 13 August 2015 (UTC)[reply]
- It should, yes. You can test your regexes in AWB in the "Advanced settings" pane. Alakzi (talk) 08:53, 13 August 2015 (UTC)[reply]
- Tested, and it works. I've updated the function details above to include the regex details. Thanks for your help. ~ RobTalk 09:15, 13 August 2015 (UTC)[reply]
- It should, yes. You can test your regexes in AWB in the "Advanced settings" pane. Alakzi (talk) 08:53, 13 August 2015 (UTC)[reply]
- This is my first time working with regex, so apologies for my lack of knowledge, but "(?=\s*\|)" would work as you described, correct? ~ RobTalk 08:40, 13 August 2015 (UTC)[reply]
- It would, but it would also be safer to check if the footnote is followed by anything except whitespace, newlines and a vertical bar. Alakzi (talk) 07:55, 13 August 2015 (UTC)[reply]
- @Alakzi: Having looked through probably 500 of these pages and doing my semi-automated "trial", I've encountered no articles that have the footnote in the middle of their career history. I could add "(?!\s\*)" to the end of each string being looked for in an attempt to pick up any articles that had a list of teams, stuck the footnote in the middle, then continued the list. Would that address your concern, or am I misunderstanding it? ~ RobTalk 07:51, 13 August 2015 (UTC)[reply]
Approved for trial (50 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete. -- Magioladitis (talk) 17:57, 14 August 2015 (UTC)[reply]
I would also like Frietjes to comment whether they agree with the task. -- Magioladitis (talk) 17:58, 14 August 2015 (UTC)[reply]
- yes, replacing these with a parameter is a very good idea. Frietjes (talk) 18:13, 14 August 2015 (UTC)[reply]
Trial complete. Looking through trial results now. I will likely propose additional strings to find and replace with the footnote, as many more articles were skipped than anticipated (20 skipped, 50 edits). ~ RobTalk 19:33, 14 August 2015 (UTC)[reply]
- No errors found. I propose adding the following strings to find and replace with the new parameter, based on looking at the skipped articles. All notes are extremely similar and formatted using the same regex, with minor variations. This won't capture everything, but it should help. Whatever remains should be manageable to manually fix. ~ RobTalk 19:44, 14 August 2015 (UTC)[reply]
\:\<small\>\*Offseason and\/or practice squad only\<\/small\>(?=\s*\|) \:\<small\>\*Offseason or practice squad member only\<\/small\>(?=\s*\|) \:\{\{small\|\* Offseason and\/or practice squad member only\}\}(?=\s*\|) \:\<small\>\* Offseason and\/or practice squad member only\<\/small\>(?=\s*\|) \:\<small\>\*Inactive and\/or offseason member only\<\/small\>(?=\s*\|) \:\<small\>\*Offseason and\/or \[\[practice squad\]\] member only\<\/small\>(?=\s*\|) \:\<small\> \*Offseason and\/or practice squad member only\<\/small\>(?=\s*\|)
Approved for extended trial (100 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete. Please do 100 additional edits using the extra rules you proposed. -- Magioladitis (talk) 14:05, 15 August 2015 (UTC)[reply]
- Trial complete. No errors found. 27 skipped with 100 edits, which is much better considering that there are a few strings that I can't replace for technological reasons and there are some articles in this maintenance category with small text used in other ways. I'm satisfied with the bot, now that those additional rules are in use. ~ RobTalk 15:39, 15 August 2015 (UTC)[reply]
- A user has requested the attention of a member of the Bot Approvals Group. Once assistance has been rendered, please deactivate this tag by replacing it with
{{t|BAG assistance needed}}
. ~ RobTalk 09:12, 22 August 2015 (UTC)[reply]- @Magioladitis: Not to rush, but my fall semester is starting shortly, and my free time with which to fix any issues found in the latest trial will be limited. If this could be reviewed before this weekend, I'd appreciate it. Otherwise, I can't guarantee when I'll be able to respond to any concerns. The latest trial is the most recent 100 edits at Special:Contributions/BU_RoBOT. ~ RobTalk 15:39, 26 August 2015 (UTC)[reply]
- A user has requested the attention of a member of the Bot Approvals Group. Once assistance has been rendered, please deactivate this tag by replacing it with
- Approved. — from the ones I checked, it seemed fine. Cheers =) --slakr\ talk / 03:54, 27 August 2015 (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.