Wikipedia:Bots/Requests for approval/AnomieBOT 52
- The following discussion is an archived debate. Please do not modify it. To request review of this BRFA, please start a new section at Approved.
Time filed: 19:17, Friday August 26, 2011 (
Automatic or Manual: Automatic, unsupervised
Programming language(s): Perl
Source code available: User:AnomieBOT/source/tasks/FlagIconRemover.pm
Function overview: Remove flag icons from infoboxes or other layout templates, where consensus exists that the template should not contain flag icons.
Links to relevant discussions (where appropriate):
Edit period(s): Periodic
Estimated number of pages affected: There are currently 7248 articles transcluding both one of the target infoboxes and a flag template. Not all of these will actually be edited, for example
Exclusion compliant (Y/N): Yes
Already has a bot flag (Y/N): Yes
Function details: The bot will do the following:
- Get a list of articles that transclude both one of its target templates and any of the templates in Category:Flag templates or Category:Flag template system.
- Load the text of each article.
- Go through all the parameters of the target infoboxes in the text.
- Use
action=expandtemplates
to obtain the wikitext of any flag template invocations found, and replace the flag template invocation with this wikitext minus any flag icon images.
Discussion
Just to be 100% clear, this will not remove flag icons arbitrarily. It will only remove flag icons within the parameters of certain specific infoboxes or other layout templates. At the moment, the target templates are {{
What I am calling a "layout template" is a template that displays structured data, even if it isn't technically an infobox. For example, {{Video game table}} would be a layout template. I don't know if there are any that will want this treatment, but if one comes up it would be nice to be able to handle it.
There may be cases where consensus determines that
<!-- keep flag per consensus -->
next to the flag template (simple but difficult to search for); adding a dummy parameter to the flag template invocation, e.g. {{flag|US|consensus to keep=yes}}
(somewhat cryptic, possible to search for if someone adds a tracking category to the template); or adding another template such as {{keep flag per consensus}} next to the flag template (a whole extra template, but easily tracked using Special:WhatLinksHere). Anomie⚔ 19:17, 26 August 2011 (UTC)[reply Approved for trial (50 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete. Discussions suggest consenus for this. Also, I prefer {{
- Trial complete. [1] Also, a sandbox edit to test
|consensus to keep=yes
. Anomie⚔ 23:44, 28 August 2011 (UTC)[reply]
- Edits seem good. Will leave open for a little longer to gather some feedback/input may be. — TALK 07:17, 29 August 2011 (UTC)[reply]
- Looks good to me too, maybe the edit summary could be a bit shorter. --Elekhh (talk) 01:02, 4 September 2011 (UTC)[reply]
- I'm open to suggestions, but do keep in mind ]
- I see, and agree it should stay as informative as is. I was thinking that maybe the the instructions for the exceptional IAR cases could be simply linked to (for instance to this page per Sven's suggestion), rather then repeating it in each edit summary. Is so much nicer when an edit summary fits into one line. It is a minor thing though which should not defer the implementation. --Elekhh (talk) 01:53, 4 September 2011 (UTC)[reply]
- After some reflection, I've decided to take your suggestion. Except I'll create User:AnomieBOT/docs/FlagIconRemover instead of linking to fragmented discussions. Anomie⚔ 00:14, 12 September 2011 (UTC)[reply]
- I see, and agree it should stay as informative as is. I was thinking that maybe the the instructions for the exceptional IAR cases could be simply linked to (for instance to this page per Sven's suggestion), rather then repeating it in each edit summary. Is so much nicer when an edit summary fits into one line. It is a minor thing though which should not defer the implementation. --Elekhh (talk) 01:53, 4 September 2011 (UTC)[reply]
- I'm open to suggestions, but do keep in mind ]
- Edits seem good. Will leave open for a little longer to gather some feedback/input may be. —
{{
Approved. All appears to be in order, no further core task related comments were made after the trial. Trusted bot-op, task follows only consensus discussions. —
- 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.