Wikipedia:Bots/Requests for approval/BHGbot 4
- 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 Revoked.
- 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: BrownHairedGirl (talk · contribs · SUL · edit count · logs · page moves · block log · rights log · ANI search)
Time filed: 19:49, Saturday, October 26, 2019 (UTC)
Function overview: When a portal has been deleted at MFD, remove or replace links to it which are generated by one of 4 templates: {{Portal}}, {{Portal bar}}, {{Portal-inline}}, {{Subject bar}}
Use the next-most specific portal if available, otherwise remove the link(s). In most cases I have flagged this at the MFD.
Automatic, Supervised, or Manual: Automatic, but monitored.
Programming language(s): AWB
Source code available: See AWB settings files linked below
Links to relevant discussions (where appropriate): User talk:BrownHairedGirl#Your_AWB_edits, where I was encouraged by User:TheSandDoctor to use a bot for this task
Edit period(s): Whenever a portal is deleted. There may be one or two per day, or none for a week, or five on one day.
Estimated number of pages affected: Anywhere between 1 and 15,000 per deleted portal
Namespace(s): Article, Category, Draft
Exclusion compliant (Yes/No): Can't see how to do it in AWB, but will do if possible
Function details:
- Examples of tasks already done without bot flag, by User:BrownHairedGirl
- Single replacement: Wikipedia:Miscellany for deletion/Portal:Family Guy (3rd nomination). Replace links to deleted Portal:Family Guy with Portal:Television, and remove any resulting duplicates. Copy of settings file used: /AWB settings: Portal-Family Guy to Portal-Television
- Double replacement: Wikipedia:Miscellany for deletion/Portal:Musical theatre. Replace links to deleted Portal:Musical theatre with Portal:Music + Portal:Theatre, and remove any resulting duplicates. Copy of settings file used: /AWB settings: Portal-Musical theatre to Portal-Music + Portal-Theatre
- Removal: Wikipedia:Miscellany for deletion/Portal:Dance. Remove links to deleted Portal:Dance, and remove any instances of {{Portal}}/{{Portal bar}}/{{Portal-inline}} which are left empty. Copy of settings file used: /AWB settings: Remove Portal-Dance
- Methodology
I use a separate AWB settings file for each portal. For each run I copy the most recent settings file of that type (single replace/double replace/remove), save it under a new name. I then modify the edit summary and the regexes in the "Find and replace: advanced settings" to use the relevant portal names, and test it on a few sample pages.
Core tasks:
- One regex to make the replacement in any instance of {{Portal}}/{{Portal bar}}/{{Portal-inline}} (plus their aliases)
- A regex for each target portal, to remove duplicate instances of any given portal in {{Portal}}/{{Portal bar}}/{{Portal-inline}} (plus their aliases)
- One regex to make the replacement in any instance of {{Subject bar}} (plus its aliases)
- A regex for each target portal, to remove duplicate instances of any given portal {{Subject bar}} (plus its aliases)
Tidyup tasks, all flagged as minor so that they are not implemented unless a portal link is replaced:
- Remove empty instances of {{Portal}}/{{Portal bar}}/{{Portal-inline}}
- Canonicalise names of the portal templates above, and also of {{Cat main}}
Genfixes:
- Std AWB genfixes, auto tagging, and Unicode the page
- Cleanup HTML line breaks, per Help:Line-break_handling#.3Cbr_.2F.3E_or_.3Cbr.3E: "Please correct invalid occurrences – such as
</br>
,< br>
, or</ br>
– to<br />
as you encounter them, though preferably as a part of a more substantive edit."
Note that replacing one portal link with two links breaks {{Portal-inline}}, which accepts only one portal as parameter. It would be simple to replace {{Portal-inline|Foobar}}
with {{Portal-inline|Foo}}
{{Portal-inline|FoobarBar}}
… but the template is used in a variety of different contents with preceding markups, so my experiments with regex replacement got v complex and still didn't cover all cases. So my current strategy is to let AWB leave them with the multiple parameters, and the manually clean them up. I modified[1] Module:Portal-inline to track such cases in Category:Portal-inline template with more than one portal parameter, so they are easily and reliably detected. There are usually very few such cases, even after a long run, and they are easily fixed.
I have already used this setup successfully on over 100,000 pages. --BrownHairedGirl (talk) • (contribs) 19:49, 26 October 2019 (UTC)[reply]
- PS User:BHGbot (edit | talk | history | links | watch | logs) has been unused for years, so it no longer has either a BOT flag or AWB permission. Both will be needed for this task to run. --BrownHairedGirl (talk) • (contribs) 20:05, 26 October 2019 (UTC)[reply]
Discussion
[edit]Approved for trial. Please provide a link to the relevant contributions and/or diffs when the trial is complete. a full run for 1 deleted portal. Pick one that isn't spammed on 13 billion articles (aim for <100 pages if possible). Headbomb {t · c · p · b} 22:05, 26 October 2019 (UTC)[reply]
- AWB access granted. cc BrownHairedGirl --TheSandDoctor Talk 22:14, 26 October 2019 (UTC)[reply]
- Thanks, Headbomb and TheSandDoctor. I will do Portal:Sailing, which has just been closed, and up to 244 links to be fixed (some may be due to templates). --BrownHairedGirl (talk) • (contribs) 22:19, 26 October 2019 (UTC)[reply]
- @Headbomb: Test completed, in these 243 edits. The page skipped was Category:Wikipedia requested images of sailing. --BrownHairedGirl (talk) • (contribs) 22:50, 26 October 2019 (UTC)[reply]
- Trial complete. So the template updates. --TheSandDoctor Talk 23:19, 26 October 2019 (UTC)[reply]
- @BrownHairedGirl: I noticed that you have continued to make these edits on your main account. Could you please cease this now that the BRFA is filed with the express intent to "take over" those actions? I would approve this for you, but since I was the one to ask you to file, it should probably be someone else to review. Please have patience as this may take a couple days. Thank you. --TheSandDoctor Talk 05:41, 27 October 2019 (UTC)[reply]
- @TheSandDoctor: That's a pity. There have been about half-a-dozen portal MFD closures over the last 24 hours, so there's a backlog building up at Category:Portal templates with redlinked portals and its subcats. If I can't use my AWB setup, then others are likely to remove portal links rather than replacing them, or waste time doing manual replacements. And in the meantime the tracking categories are too flooded to be used for tracking errors.
- I can see the case that a bot is better, but putting everything on hold seems unhelpful. --BrownHairedGirl (talk) • (contribs) 15:54, 27 October 2019 (UTC)[reply]
- TheSandDoctor: I appreciate your desire to have another BAGger close it, but perhaps you could perform the technical review of the trial so that it’s streamlined for the closer to put their stamp on it? –xenotalk 13:35, 1 November 2019 (UTC)[reply]
- Thanks, xeno. Anything to speed the process would be helpful, because my compliance with TheSandDoctor's request above to stop doing such edits from my main account means that a backlog is building up. There are now about ten deleted portals needing link cleanup, and I think it's a great pity that this uncontroversial cleanup has been put on hold. --BrownHairedGirl (talk) • (contribs) 14:15, 1 November 2019 (UTC)[reply]
- {{BAG assistance needed}} <-- I think this one sends a bag signal. –xenotalk 15:57, 1 November 2019 (UTC)[reply]
- You are correct xeno that that does send the BAG signal ;) --TheSandDoctor Talk 16:11, 1 November 2019 (UTC)[reply]
- @BrownHairedGirl: Just curious: what causes this extra line in some of the trails? --TheSandDoctor Talk 16:11, 1 November 2019 (UTC)[reply]
- @TheSandDoctor: that is an AWB genfix. AWB keeps a single blank line above the category list. I presume this is as part of Wikipedia:AutoWikiBrowser/General_fixes#Categories_(RemoveCats), tho it's not explicitly documented there. --BrownHairedGirl (talk) • (contribs) 16:53, 1 November 2019 (UTC)[reply]
- I've reviewed about a hundred of the edits and have seen no problems. There have been quite a few genfixes, but all of them have been improvements and they could easily be disabled if they are percived to pose a problem. This really should be approved as quickly as possible. ‑‑Trialpears (talk) 17:17, 1 November 2019 (UTC)[reply]
- Only thing that really gives me pause is
<br>
to<br />
, as in here. Or useless<br/>
to<br />
ones like [2]. That seems unnecessary, and isn't part of default genfixes for a reason. Headbomb {t · c · p · b} 17:45, 1 November 2019 (UTC)[reply]- @BrownHairedGirl: ^ --TheSandDoctor Talk 17:48, 1 November 2019 (UTC)[reply]
- @Headbomb: as per the Methodology/Gefixes section of my request above, those are per Help:Line-break_handling#.3Cbr_.2F.3E_or_.3Cbr.3E. I can easily disable them if that's required, but while they are a perfect example sort of thing which shouldn't be done as a standalone edit, it seems a pity not to do this simple recommended fix when the page is being edited anyway. --BrownHairedGirl (talk) • (contribs) 18:22, 1 November 2019 (UTC)[reply]
- That page specifically says to correct invalid occurrences – such as < br>, or </ br> – to <br />... (emphasis mine). Those I diffed were not invalid occurrences. Headbomb {t · c · p · b} 20:12, 1 November 2019 (UTC)[reply]
- @Headbomb: I have been going on the previous para, which describes the valid forms which break syntax some highlighters as
better avoided
. I guess if I read the whole thing more closely maybe the "recommended fix" of the previous para doesn't apply to those valid forms. As above, it still strikes me as an easily-done change which muchly helps those who use syntax highlighters, and I don't see a downside. But again, if you want me to turn it off, I will do, though sadly. --BrownHairedGirl (talk) • (contribs) 22:58, 1 November 2019 (UTC)[reply]- @BrownHairedGirl: it's more a for now kinda thing. These things may or may not be contentious. However no other bot, to my knowledge, has been doing blanket conversions of mediawiki-valid, but html-invalid markup (converting mediawiki-invalid markup is more than fine though). I'm not against including those fixes down the road, but I'd want to see a wider discussion about them specifically first. It could be that the prefered solution of the community is to fix/update the syntax highlighters instead of fix/updating thousands+ of individual articles. Headbomb {t · c · p · b} 23:06, 1 November 2019 (UTC)[reply]
- @Headbomb: I'm not persuaded of the merits of that, but it's also clear that nor have I persuaded you of my view. <smile>
- So I think the simplest step is that to put this aside: I just disable that one line for now, pending any wider community discussions. So please can you assess the bot on the basis that this <br /> fixing won't be part of it? I'd just like to get the core task underway again. --BrownHairedGirl (talk) • (contribs) 23:40, 1 November 2019 (UTC)[reply]
- @BrownHairedGirl: it's more a for now kinda thing. These things may or may not be contentious. However no other bot, to my knowledge, has been doing blanket conversions of mediawiki-valid, but html-invalid markup (converting mediawiki-invalid markup is more than fine though). I'm not against including those fixes down the road, but I'd want to see a wider discussion about them specifically first. It could be that the prefered solution of the community is to fix/update the syntax highlighters instead of fix/updating thousands+ of individual articles. Headbomb {t · c · p · b} 23:06, 1 November 2019 (UTC)[reply]
- @Headbomb: I have been going on the previous para, which describes the valid forms which break syntax some highlighters as
- That page specifically says to correct invalid occurrences – such as < br>, or </ br> – to <br />... (emphasis mine). Those I diffed were not invalid occurrences. Headbomb {t · c · p · b} 20:12, 1 November 2019 (UTC)[reply]
- @Headbomb: as per the Methodology/Gefixes section of my request above, those are per Help:Line-break_handling#.3Cbr_.2F.3E_or_.3Cbr.3E. I can easily disable them if that's required, but while they are a perfect example sort of thing which shouldn't be done as a standalone edit, it seems a pity not to do this simple recommended fix when the page is being edited anyway. --BrownHairedGirl (talk) • (contribs) 18:22, 1 November 2019 (UTC)[reply]
- @BrownHairedGirl: ^ --TheSandDoctor Talk 17:48, 1 November 2019 (UTC)[reply]
- Only thing that really gives me pause is
Approved. without the <br>→<br/> thing. If there's a wider discussion in favour of those fixes, file another BRFA for those and I'll speedily approve. Headbomb {t · c · p · b} 23:45, 1 November 2019 (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.
Revoked. See Special:Diff/937425282. Primefac (talk) 23:26, 24 January 2020 (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.