Wikipedia:Bots/Requests for approval/BsoykaBot 3


 * The following discussion is an archived debate. Please do not modify it. To request review of this BRFA, please start a new section at Bots/Noticeboard. The result of the discussion was

BsoykaBot 3
Operator:

Time filed: 02:53, Saturday, March 23, 2024 (UTC)

Automatic, Supervised, or Manual: automatic

Programming language(s): Python (Pywikibot)

Source code available: bsoyka/wikipedia-bot on GitHub

Function overview: Corrects capitalization of "NFL draft" in wikilinks within articles

Links to relevant discussions (where appropriate): Requests for comment/Capitalization of NFL draft article titles, ,

Edit period(s): Initial daily batched edits followed by weekly runs

Estimated number of pages affected: ~ 46,000 initially

Exclusion compliant (Yes/No): Yes

Already has a bot flag (Yes/No): Yes

Function details: This script searches for pages linking to "[year] NFL Draft" and "List of [players] in the NFL Draft" pages, which are all now redirects using "NFL draft" (note capitalization) per this RfC and related discussions. The script then corrects the capitalization of these links, including within wikilinks, templates,  templates, and  templates. (It does not make any cosmetic-only edits, such as only changing 2024 to 2024.) I initially found 46,276 pages that link to one or more of these redirects and would likely be edited by this task initially. I plan to do an initial run with this list, editing 1,000 pages daily until the list is exhausted. (I'm open to other number suggestions—I just don't want to flood watchlists and whatnot too quickly.) Finally, here's an example diff in my sandbox.

Discussion
I also ran across some instances inside further—Bagumba (talk) 03:16, 23 March 2024 (UTC)
 * @Bagumba: Quick and easy addition—thanks! Bsoyka  (t &bull; c &bull; g) 03:19, 23 March 2024 (UTC)

The script then corrects the capitalization of these links, including within wikilinks: To be clear, would NFL Draft become NFL draft too?—Bagumba (talk) 03:23, 23 March 2024 (UTC)
 * @Bagumba: As of now, yes. The actual procedure behind it is that the exact word "draft" in any capitalization within a wikilink's text becomes lowercase. Here's the code behind this and an example. Bsoyka  (t &bull; c &bull; g) 03:28, 23 March 2024 (UTC)
 * Thanks.—Bagumba (talk) 03:31, 23 March 2024 (UTC)

As the well-attended RfC confirmed that "NFL Draft" should be lowercase in titles and prose, changing the "NFL Draft" redirect links and any piped text in articles seems to be a well-defined, low-risk task that is non-cosmetic. As someone doing this semi-manually on JWB, I hope this bot can be approved for this high-volume task.—Bagumba (talk) 03:39, 23 March 2024 (UTC)


 * More NFL Draft changes (downcasings) are needed in links to "List of * in the NFL Draft". It looks like there are 634 such over-capped redirects, with many links to each.  This could be added here, or in a later bot request, perhaps with all the other league drafts added.  I hope this first round goes well so we can advance to the rest (most of the other were approved via RM discussions, so didn't specially talk about "in text" as the NFL RFC did, but that's how it's done, so I don't think there will be any further controversy).  Dicklyon (talk) 23:47, 24 March 2024 (UTC)
 * Good point. Including this search, I have now found 46,276 pages to edit initially, which I've updated above. Updated code coming soon to support this additional change. Bsoyka  (t &bull; c &bull; g) 02:03, 25 March 2024 (UTC)
 * Updated and quickly tested. Bsoyka  (t &bull; c &bull; g) 02:14, 25 March 2024 (UTC)
 * Cosmetics question: You say above "(It does not make any cosmetic-only edits, such as only changing 2024 to 2024.)"  I had suggested you not edit articles where that would be the only change, as that would be "purely cosmetic", but it's still worth doing in articles where you're doing other changes, to help with the tracking of links to miscapitalized redirects, right?  So you'd go ahead and make that edit when other non-cosmetic changes are being made in the same article?  Or not?  Dicklyon (talk) 05:38, 25 March 2024 (UTC)
 * @Dicklyon: To clarify, yes, cosmetic changes will be made when other non-cosmetic edits are done on the same page. The bot just shouldn't make any edits that are solely cosmetic changes, in line with your suggestion. Bsoyka  (t &bull; c &bull; g) 21:04, 25 March 2024 (UTC)
 * Thanks for clarifying. Dicklyon (talk) 10:35, 26 March 2024 (UTC)

Maybe faster is better. If there's no adverse reaction after a few days at 1000 per day, I'd suggest cranking up to 3000 per day, to get it done in a little over 2 weeks. Dicklyon (talk) 10:26, 27 March 2024 (UTC)

Since it's been a week: BAG assistance needed Bsoyka  (t &bull; c &bull; g) 13:56, 31 March 2024 (UTC)
 * , these may have already been addressed by hand, but curious if this would capture the use of "Draft" (unlinked) in a section heading? As an example, which has been fixed, see the headings in Washington Commanders draft history. « Gonzo fan2007  (talk)  @ 20:07, 3 April 2024 (UTC)
 * As of now, this does not address that. I feel like that's likely a bit more complicated to find and fix without false positives. Bsoyka  (t &bull; c &bull; g) 01:45, 4 April 2024 (UTC)
 * Agree that it's riskier, but also less frequent. Section names can be lumped in with manual exercise of dealing with unlinked "NFL Draft" references in prose.—Bagumba (talk) 03:13, 4 April 2024 (UTC)
 * Primefac (talk) 09:48, 22 April 2024 (UTC)
 * It looks like Bsoyka hasn't edited for a few days. Here's hoping he's back soon and still willing to work on this. Dicklyon (talk) 03:15, 24 April 2024 (UTC)
 * I'm still around, but very busy in real life at the moment. I plan to try to get this up and running in around the next week, maybe two, whenever I find a free moment. Bsoyka  (t &bull; c &bull; g) 18:52, 24 April 2024 (UTC)
 * Contributions here, and all went well from my review. A few interesting cases to point out that worked as intended are: updates with, a piped link with a linked section, another piped link, and a link with a slightly different new target. Bsoyka  (t &bull; c &bull; g) 00:46, 9 May 2024 (UTC)
 * Thanks! Those look great to me. Looking through them, though, I don't see any example of fixing links to NFL Draft itself, just the YYYY NFL Draft links.  This is probably because you took a random sample and there are only about 1260 articles linking NFL Draft, of the 46,000 identified as linking all the year drafts.  Is it worth pulling out a few to illustrate that case?  I did find one edit fixing a "list of" link; that's good, though I'm wondering why there weren't more. It looks like it's because most of the linking articles are actually getting those via infobox templates.  So those articles don't need to be edited, but the templates do.  Are templates on your list of files to edit?  If not, let's just save that for a later task, as some more target filtering may be needed. Dicklyon (talk) 15:06, 14 May 2024 (UTC)
 * Looking at your code, I see links to NFL Draft are not included, and looking at the original bot request, it seems we didn't ask for that. So, no need to add now, but maybe later. Dicklyon (talk) 21:34, 14 May 2024 (UTC)
 * Primefac (talk) 13:16, 26 May 2024 (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 Bots/Noticeboard.