Wikipedia:Bots/Requests for approval/Abotzi
- 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: Alakzi (talk · contribs · SUL · edit count · logs · page moves · block log · rights log · ANI search)
Time filed: 17:15, Wednesday, August 5, 2015 (UTC)
Automatic, Supervised, or Manual: Automatic
Programming language(s): AWB / Lua
Source code available: AWB / Module:Infobox college coach/convert (test cases)
Function overview: The bot will split <br>
-separated career pseudo-lists in {{Infobox college coach}} into numbered parameters. For an explanation of why this is needed, see Wikipedia:WikiProject Accessibility/Infoboxes.
Links to relevant discussions (where appropriate):
- User talk:Alakzi#Template:Infobox college coach
- Wikipedia talk:WikiProject Accessibility#Use of inaccessible markup in gridiron football infoboxes is widespread
Edit period(s): one-time run
Estimated number of pages affected: 6,233
Exclusion compliant (Yes/No): Yes
Already has a bot flag (Yes/No): No
Function details:
The bot will replace the pattern "\{\{ *(infobox college coach|infobox athletic director|college coach infobox)"
(case-insensitive) with {{subst:#invoke:Infobox college coach/convert|main|
, and save edits with the following edit summary: "Split teams/years using Module:Infobox college coach/convert". AWB auto-tagging will be switched off.
The script will split *_teams
and *_years
parameters at <br>
; and print out one of each consecutively. If either the year or team in a pair is blank, the non-blank value will be assumed to be a sport. If both are blank, the pair will be skipped. The output is demonstrated below.
In | Out |
---|---|
| player_years = Baseball<br>1960<br>1961 | player_teams = <br>Team 1<br>Team 2 |
| player_sport1 = Baseball | player_years2 = 1960 | player_team2 = Team 1 | player_years3 = 1961 | player_team3 = Team 2 |
The script will fail gracefully under the following conditions: the header and data cells are unbalanced; the header cell is empty; the data cell is empty. Upon failure, the content of the infobox will remain intact, and the script will print an HTML comment with the error message directly above any affected parameters to guide editors in making manual corrections.
Discussion
edit- just make sure it won't barf on
{{Infobox college coach<!-- some trailing comment -->
... an easy way to prevent this is to replace with{{subst:#invoke:Infobox college coach/convert|main|
(trailing pipe). Frietjes (talk) 19:49, 5 August 2015 (UTC)[reply]- Corrected, thank you. Alakzi (talk) 19:51, 5 August 2015 (UTC)[reply]
Approved for trial (60 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete. -- Magioladitis (talk) 14:25, 6 August 2015 (UTC)[reply]
- @Magioladitis: Need AWB bot access on Abotzi. Thanks. Alakzi (talk) 16:06, 6 August 2015 (UTC)[reply]
@Alakzi: Can you please do the edits manually using the bot account? -- Magioladitis (talk) 17:02, 6 August 2015 (UTC)[reply]
- @Magioladitis: I can, but I'd still need AWB access. :-) Alakzi (talk) 17:03, 6 August 2015 (UTC)[reply]
- @Alakzi: Just gave it to you :) -- Magioladitis (talk) 17:03, 6 August 2015 (UTC)[reply]
Trial completed with one error, which was to overwrite a previous partial conversion (Special:Diff/674865205); this is probably best addressed by removing these pages from the category. I've not spotted any other issues. Alakzi (talk) 17:25, 6 August 2015 (UTC)[reply]
- No articles should exist that contain both "coaching_years" and "coaching_years1" (i.e. a partial conversion within a single "type" of parameter). If you were to add to the script to pass the new parameters through, similar to how you're handling things like "death_date", that would presumably solve the issue. I'm not sure that's worth the work. It depends on how many partial conversions exist, and how easy it is to remove them from the category. ~ RobTalk 17:39, 6 August 2015 (UTC)[reply]
- I could do that, but the bot would then be making cosmetic changes (if any changes at all). It's better to just skip them. Alakzi (talk) 17:54, 6 August 2015 (UTC)[reply]
- I meant only for use in situations where there also exists a deprecated parameter that must be removed, since you're using Category:Articles using Template:Infobox college coach with deprecated parameters as the basis for your edits. Every edit would still remove a deprecated parameter. ~ RobTalk 17:57, 6 August 2015 (UTC)[reply]
- I don't think there's any articles which use both the old and new parameters of a specific type, if that's what you mean. Not every edit would remove a deprecated parameter; the bot will not convert a years/teams pair if the teams and years don't line up, or if either parameter is empty. Alakzi (talk) 18:08, 6 August 2015 (UTC)[reply]
- I meant only for use in situations where there also exists a deprecated parameter that must be removed, since you're using Category:Articles using Template:Infobox college coach with deprecated parameters as the basis for your edits. Every edit would still remove a deprecated parameter. ~ RobTalk 17:57, 6 August 2015 (UTC)[reply]
- I could do that, but the bot would then be making cosmetic changes (if any changes at all). It's better to just skip them. Alakzi (talk) 17:54, 6 August 2015 (UTC)[reply]
Trial complete. Magioladitis (talk) 21:24, 6 August 2015 (UTC)[reply]
Approved. Magioladitis (talk) 09:59, 11 August 2015 (UTC)[reply]
- @Magioladitis: Thank you. Is there something that I need to do at this point? WP:BRFA reports "Inconsistent categories/tags!". Alakzi (talk) 13:40, 11 August 2015 (UTC)[reply]
- It does seem he forgot to add the archive tags... I'll do it myself since I don't see a point waiting. — Earwig talk 17:44, 11 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.