Wikipedia:Bots/Requests for approval/EarwigBot 4
- The following discussion is an archived debate. Please do not modify it. Subsequent comments should be made in a new section. The result of the discussion was
Approved.
Operator: The Earwig (Talk | Contributions)
Automatic or Manually Assisted: Automatic, unsupervised
Programming Language(s): Python and Pywikipedia
Function Overview: The bot finds and removes all duplicate instances of the template {{WikiProject Russian History}}, per this BOTREQ.
Edit period(s): One time run
Already has a bot flag (Y/N): N
Function Details: This bot is in response to this bot request, brought up because of the recent merger between WikiProject Russian History and WikiProject Russia. This merger, accompanied by making the previously-used template {{WikiProject Russian History}} now redirect to {{WikiProject Russia}}, caused a large number of articles with both templates to have the same template twice. This bot's purpose, using a manually-compiled file, is to remove all instances of {{WikiProject Russian History}} unless the page doesn't have {{WikiProject Russia}}, in which case it does nothing. This is to avoid removing the WikiProject from the page altogether.
The bot functions by using a slightly-modified version of the replace.py (source) Pywikipedia module with the following regex:
$python RussianWikiprojectRemoval.py -file:RussianWikiprojectRemoval.txt -regex -nocase "{{WikiProject Russian (H|h)istory(.*)}}" "" -excepttext:"{{WikiProject Russia[^n]}}"
Thus, the bot will remove all instances of the template unless the other template is not there.
Discussion
[edit]Update: The bot's pages list has been compiled. View it here. The Earwig (Talk | Contributions) 16:23, 9 May 2009 (UTC)reply
- Shouldn't the regex be:
"{{WikiProject Russian (H|h)istory(.*?)}}"so that it isn't greedy? LegoKontribsTalkM 03:23, 10 May 2009 (UTC)reply- Shouldn't it also add the {{WikiProject Russia}} tag? Pages such as Talk:Okrug will be left without a template. Xclamation point 03:33, 10 May 2009 (UTC)reply
- Lego, nice catch there. X!, that's the whole point of this bot! Pages like Talk:Okrug will be skipped because they only have one template on them. The point of the bot is not to fix un-broken template transclusions, but rather to remove the double-instance of one template on the same page, such as with Talk:Khrushchev Thaw. The Earwig (Talk | Contributions) 03:43, 10 May 2009 (UTC)reply
- Ah yes, I misread. Xclamation point 03:48, 10 May 2009 (UTC)reply
- Lego, nice catch there. X!, that's the whole point of this bot! Pages like Talk:Okrug will be skipped because they only have one template on them. The point of the bot is not to fix un-broken template transclusions, but rather to remove the double-instance of one template on the same page, such as with Talk:Khrushchev Thaw. The Earwig (Talk | Contributions) 03:43, 10 May 2009 (UTC)reply
- Shouldn't it also add the {{WikiProject Russia}} tag? Pages such as Talk:Okrug will be left without a template. Xclamation point 03:33, 10 May 2009 (UTC)reply
About how many pages do we expect it to change? – Quadell (talk) 15:35, 10 May 2009 (UTC)reply
- It's probably between 300 and 500. I can't get a specific estimate because I haven't finished compiling the list yet, but I'll have it pretty soon. The Earwig (Talk | Contributions) 16:28, 10 May 2009 (UTC)reply
Approved for trial (50 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete. Let's see her go. – Quadell (talk) 12:07, 11 May 2009 (UTC)reply
I'll have to run the bot tomorrow, the database lag is preventing the bot from running. It has to pause between edits for that huge number of seconds (built-in pywikipedia feature). Isn't that just wonderful? It keeps climbing, too!The Earwig (Talk | Contributions) 21:59, 11 May 2009 (UTC)reply- It's better now. Trial in progress. Standby as the results come in. See Special:Contributions/EarwigBot I for a live feed. The Earwig (Talk | Contributions) 00:47, 12 May 2009 (UTC)reply
Trial complete. This was a fast trial because it was fifty edits made in quick succession. My greatest apologies for forgetting to change replace.py's default edit summary. That will be fixed for the next trial/approval. The Earwig (Talk | Contributions) 01:11, 12 May 2009 (UTC)reply
|
EarwigBot I Task 3 Logs — Trial 1 Last updated: 01:11, 12 May 2009 (UTC) Edits completed: 48
|
Approved. That was a pretty boring trial. Nothing to grouse about at all. :) – Quadell (talk) 01:20, 12 May 2009 (UTC)reply
- The above discussion is preserved as an archive of the debate. Please do not modify it. Subsequent comments should be made in a new section.