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

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

BHGbot 4
Operator:

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, 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:
 * 1) One regex to make the replacement in any instance of Portal/Portal bar/Portal-inline (plus their aliases)
 * 2) A regex for each target portal, to remove duplicate instances of any given portal in Portal/Portal bar/Portal-inline (plus their aliases)
 * 3) One regex to make the replacement in any instance of Subject bar (plus its aliases)
 * 4) 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:
 * 1) Remove empty instances of Portal/Portal bar/Portal-inline
 * 2) Canonicalise names of the portal templates above, and also of Cat main

Genfixes:
 * 1) Std AWB genfixes, auto tagging, and Unicode the page
 * 2) Cleanup HTML line breaks, per Help:Line-break_handling: ''"Please correct invalid occurrences – such as, , or  – to  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 with   … 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 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. -- Brown HairedGirl  (talk) • (contribs) 19:49, 26 October 2019 (UTC)
 * PS 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. --  Brown HairedGirl  (talk) • (contribs) 20:05, 26 October 2019 (UTC)

Discussion
a full run for 1 deleted portal. Pick one that isn't spammed on 13 billion articles (aim for <100 pages if possible). &#32; Headbomb {t · c · p · b} 22:05, 26 October 2019 (UTC)
 * AWB access granted. cc -- The SandDoctor  Talk 22:14, 26 October 2019 (UTC)
 * 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). --  Brown HairedGirl  (talk) • (contribs) 22:19, 26 October 2019 (UTC)
 * @Headbomb: Test completed, in these 243 edits. The page skipped was Category:Wikipedia requested images of sailing. -- Brown HairedGirl  (talk) • (contribs) 22:50, 26 October 2019 (UTC)
 * So the template updates. -- The SandDoctor Talk 23:19, 26 October 2019 (UTC)
 * 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. -- The SandDoctor Talk 05:41, 27 October 2019 (UTC)
 * @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. -- Brown HairedGirl  (talk) • (contribs) 15:54, 27 October 2019 (UTC)


 * 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)
 * Thanks, xeno. Anything to speed the process would be helpful, because my compliance with '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. --  Brown HairedGirl  (talk) • (contribs) 14:15, 1 November 2019 (UTC)

... (emphasis mine). Those I diffed were not invalid occurrences. &#32; Headbomb {t · c · p · b} 20:12, 1 November 2019 (UTC)
 * BAG assistance needed <-- I think this one sends a bag signal. –xenotalk 15:57, 1 November 2019 (UTC)
 * You are correct that that does send the BAG signal ;) -- The SandDoctor  Talk 16:11, 1 November 2019 (UTC)
 * Just curious: what causes this extra line in some of the trails? -- The SandDoctor Talk 16:11, 1 November 2019 (UTC)
 * that is an AWB genfix. AWB keeps a single blank line above the category list. I presume this is as part of AutoWikiBrowser/General_fixes, tho it's not explicitly documented there. --  Brown HairedGirl  (talk) • (contribs) 16:53, 1 November 2019 (UTC)
 * 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)
 * Only thing that really gives me pause is  to , as in here. Or useless   to  ones like . That seems unnecessary, and isn't part of default genfixes for a reason. &#32; Headbomb {t · c · p · b} 17:45, 1 November 2019 (UTC)
 * ^ -- The SandDoctor Talk 17:48, 1 November 2019 (UTC)
 * as per the Methodology/Gefixes section of my request above, those are per Help:Line-break_handling.  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. --  Brown HairedGirl  (talk) • (contribs) 18:22, 1 November 2019 (UTC)
 * That page specifically says to correct invalid occurrences – such as, or  – to
 * 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. --  Brown HairedGirl  (talk) • (contribs) 22:58, 1 November 2019 (UTC)
 * 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. &#32; Headbomb {t · c · p · b} 23:06, 1 November 2019 (UTC)
 * I'm not persuaded of the merits of that, but it's also clear that nor have I persuaded you of my view.
 * 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 &lt;br /&gt; fixing won't be part of it? I'd just like to get the core task underway again. --  Brown HairedGirl  (talk) • (contribs) 23:40, 1 November 2019 (UTC)

without the →  thing. If there's a wider discussion in favour of those fixes, file another BRFA for those and I'll speedily approve. &#32; Headbomb {t · c · p · b} 23:45, 1 November 2019 (UTC)
 * 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.

See Special:Diff/937425282. Primefac (talk) 23:26, 24 January 2020 (UTC)
 * 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.