Wikipedia:Bots/Requests for approval/PrimeBOT 18
- 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: Primefac (talk · contribs · SUL · edit count · logs · page moves · block log · rights log · ANI search)
Time filed: 05:22, Sunday, July 16, 2017 (UTC)
Automatic, Supervised, or Manual: Automatic
Programming language(s): AWB
Source code available: WP:AWB
Function overview: Remove deprecated parameter from {{infobox video game}}
Links to relevant discussions (where appropriate): Template talk:Infobox video game#Distributor
Edit period(s): one-time run
Estimated number of pages affected: Max of ~22k
Namespace(s): All
Exclusion compliant (Yes/No): yes
Function details: Remove deprecated parameter |distributor=
from {{infobox video game}}, which was determined to be a confusing and often unnecessary parameter to have in the infobox. Bot will find and remove \|[\s]*distributor[\s]*=[\s]*(?:(?:\{\{[^}]*?}})|(?:\[\[.*?]])|[^\|}])*
(test cases)
Discussion
editIt may be helpful to remove other previously supported parameters at the same time. It looks like the main offenders in Category:Pages using infobox video game with unknown parameters are |media=
, |ratings=
, |requirements=
, |show image=
, and |version=
. – Jonesey95 (talk) 13:10, 16 July 2017 (UTC)[reply]
- I would have no issues making this amendment. In the regex above it would simply require changing
distributor
to the other parameter names. Primefac (talk) 13:20, 16 July 2017 (UTC)[reply]- Dealing routinely with templates myself, any chance you're going to encounter a nested template? Because as it is, the regex will botch the template if it tries to remove a parameter with a template as its value.—CYBERPOWER (Chat) 16:18, 16 July 2017 (UTC)[reply]
- Good catch. Updated regex is above, along with new test cases list. I do also plan on only running this inside {{Infobox video game}} and its redirects to avoid removing valid parameters in other templates. Primefac (talk) 16:26, 16 July 2017 (UTC)[reply]
- Dealing routinely with templates myself, any chance you're going to encounter a nested template? Because as it is, the regex will botch the template if it tries to remove a parameter with a template as its value.—CYBERPOWER (Chat) 16:18, 16 July 2017 (UTC)[reply]
- Alright let's do a quick trial. Approved for trial (50 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete.—CYBERPOWER (Chat) 16:28, 16 July 2017 (UTC)[reply]
- Trial complete. - Edits. Primefac (talk) 17:18, 16 July 2017 (UTC)[reply]
- Approved. Looks good, and doesn't seem likely to have additional serious bugs.—CYBERPOWER (Chat) 17:45, 16 July 2017 (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.