Wikipedia:Bots/Requests for approval/TolBot 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 Bots/Noticeboard. The result of the discussion was

TolBot 4
Operator:

Time filed: 20:52, Tuesday, July 20, 2021 (UTC)

Automatic, Supervised, or Manual: automatic

Programming language(s): Python

Source code available:

Function overview: Remove Template:Draft categories from mainspace articles

Links to relevant discussions (where appropriate):

Edit period(s): Daily–weekly

Estimated number of pages affected: ~10/wk

Exclusion compliant (Yes/No): No

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

Function details: The bot would use a regular expression (see User:Tol/Regex) to replace all instances of Template:Draft categories in pages in Category:Articles using draft categories with their contents.

Discussion
I thought we came across a bot approval for something like this last year, but I may be misremembering and admittedly I don't know how to search the bot approval archives chronologically beyond what's shown at WP:BRFA. Either way, clearly the task isn't being done, so approved for trial. ProcrastinatingReader (talk) 10:15, 25 July 2021 (UTC)


 * I'll start this up tomorrow; I haven't entirely finished the find-and-replace. (I'm also thinking of just doing this in AWB, but I have no idea how to make an AWB bot.) Tol  &#124; talk &#124; contribs 04:14, 26 July 2021 (UTC)
 * Trial edits:
 * diff #1035831556
 * diff #1035831562
 * diff #1035831565
 * diff #1035831567
 * diff #1035831570
 * diff #1035831576
 * diff #1035984608
 * diff #1035984609
 * diff #1035984612
 * diff #1035984614
 * diff #1036126622
 * diff #1036126628
 * diff #1036126633
 * diff #1036126637
 * diff #1036126638
 * diff #1036126645
 * diff #1036126647
 * diff #1036126653
 * diff #1036318220
 * diff #1036318223
 * — Tol  &#124; talk &#124; contribs @ 23:00, 27 July 2021 (UTC); 20:16, 28 July 2021 (UTC); 17:23, 29 July 2021 (UTC)
 * I've just run the task; I've been using AWB to trim the category so there aren't too many pages. I'll run it again in a few days. Interestingly, there were two empty draft categories templates; the bot handled these well. Tol  &#124; talk &#124; contribs 23:01, 27 July 2021 (UTC)
 * Should probably adjust the regex to also remove whitespace within the template. e.g. to account for diffs like . ProcrastinatingReader (talk) 00:21, 28 July 2021 (UTC)
 * @ProcrastinatingReader: I'll do that; it's currently just designed to replace the template with its contents (whitespace and all). Tol  &#124; talk &#124; contribs 00:54, 28 July 2021 (UTC)
 * I've run the task again; see diffs 7–10 above. Tol  &#124; talk &#124; contribs 20:16, 28 July 2021 (UTC)
 * And again; see diffs 11–18. Tol  &#124; talk &#124; contribs 17:23, 29 July 2021 (UTC)
 * I've finished the last trial run (diffs 19 & 20). Tol  (talk &#124; contribs) @ 20:06, 30 July 2021 (UTC)
 * Primefac (talk) 21:04, 22 August 2021 (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.