Wikipedia:Bots/Requests for approval/MalnadachBot 5
- The following discussion is an archived debate. Please do not modify it. To request review of this BRFA, please start a new section at Wikipedia:Bots/Noticeboard. The result of the discussion was
Approved.
Operator: ಮಲ್ನಾಡಾಚ್ ಕೊಂಕ್ಣೊ (talk · contribs · SUL · edit count · logs · page moves · block log · rights log · ANI search)
Time filed: 10:50, Monday, August 16, 2021 (UTC)
Automatic, Supervised, or Manual: automatic
Programming language(s): AutoWikiBrowser
Source code available: AWB, regexes given below
Function overview: Fix 3 Lint errors in substituted welcome template
Links to relevant discussions (where appropriate):
Edit period(s): One time run
Estimated number of pages affected: 27,600
Exclusion compliant (Yes/No): Yes
Already has a bot flag (Yes/No): Yes
Function details: The old versions of {{W-graphical}} and its variations had 3 Lint errors. These errors have spread to about 27,600 pages in User talk and User namespace whenever it was substed to welcome users. The errors are 1 deletable table tag (high priority Lint error), 1 missing end tag div and 1 stripped table tag (low priority Lint errors). This bot task is to fix these errors.
I will be using 3 regex to find and replace -
(\{\| width\=\"100\%\" style\=\"background\:transparent\"\n)\{\| width\=\"100\%\" style\=\"background-color\:\<\!-- Bug --\>\#\{\{\#switch\:\{\{\{color\}\}\}\|pink\=FFF5F5\|F5FFFA\}\}\"\n(\|style\=\"width\: 50\%\; border\:1px solid)
is replaced with$1$2
(\<\/p\>)(\n\|\}\n\{\| width\=\"100\%\" style\=\"background-color\:\<\!-- Bug --\>\#\{\{\#switch\:\{\{\{color\}\}\}\|pink\=FFF5F5\|F5FFFA\}\}\")
is replaced with$1</div>$2
(\* Follow \[\[Wikipedia\:Etiquette\|Wikipedia etiquette\]\]\n\* Practice \[\[Wikipedia\:Civility\|civility\]\]\n\|-\n\|\})\n\|\}(\n\|\}\n\|\})
is replaced with$1$2
This will be run in AWB's find and replace advanced settings. First regex will be the main rule, with 2 and 3 as its subrules.
Here is a sample edit in my sandbox - Special:Diff/1039043219
Discussion
[edit] Approved for trial (30 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete. 10 of each regex. ProcrastinatingReader (talk) 21:11, 19 August 2021 (UTC)[reply]
- @ProcrastinatingReader: I should have explained clearer but these 3 errors are from the same template, so will be present in a page together. The bot will fix all 3 errors in the same edit. Should I do trial in 10 pages in 3 separate edits per regex? ಮಲ್ನಾಡಾಚ್ ಕೊಂಕ್ಣೊ (talk) 03:20, 20 August 2021 (UTC)[reply]
- Ah, okay. Separate edits not necessary. Feel free to just do 30 normal edits. ProcrastinatingReader (talk) 10:19, 20 August 2021 (UTC)[reply]
Trial complete. by doing 30 edits using all 3 regexes at once. Result is here. ಮಲ್ನಾಡಾಚ್ ಕೊಂಕ್ಣೊ (talk) 11:12, 20 August 2021 (UTC)[reply]
Approved. Primefac (talk) 21:02, 22 August 2021 (UTC)[reply]
- Ah, okay. Separate edits not necessary. Feel free to just do 30 normal edits. ProcrastinatingReader (talk) 10:19, 20 August 2021 (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 Wikipedia:Bots/Noticeboard.