Wikipedia:Bots/Requests for approval/DeprecatedFixerBot 7
[[User:DeprecatedFixerBot|DeprecatedFixerBot 7]]
{{Newbot|DeprecatedFixerBot|7}}
Operator: {{botop|TheSandDoctor}}
Time filed: 21:51, Wednesday, March 13, 2019 (UTC)
Automatic, Supervised, or Manual: automatic
Programming language(s): Python
Source code available: https://github.com/TheSandDoctor/thefinalball_template_remover
Function overview: Removes {{tl|TheFinalBall}} wherever present.
Links to relevant discussions (where appropriate): Wikipedia:Bot_requests#Remove_Template%3ATheFinalBall, Wikipedia:Templates for discussion/Log/2019 February 13#Template:TheFinalBall
Edit period(s): one time run
Estimated number of pages affected: 300-400
Exclusion compliant (Yes/No): No
Already has a bot flag (Yes/No): Yes
Function details: The bot would run through all the transclusions of {{tl|TheFinalBall}} and remove them where found on the respective pages.
=Discussion=
{{BotTrial|edits=50}} SQLQuery me! 22:02, 13 March 2019 (UTC)
- {{BotTrialComplete}} {{re|SQL}} Worked as expected. [https://en.wikipedia.org/w/index.php?title=Special:Contributions/DeprecatedFixerBot&dir=prev&offset=20181030062556&target=DeprecatedFixerBot edits] --TheSandDoctor Talk 22:17, 13 March 2019 (UTC)
::It worked as expected in most cases. It is not context sensitive to the location (ie if between ref tags) and that is something I will have to investigate further. A solution is to manually clean up after the bot where necessary, which I would of course volunteer to do. That said, I will look for a programatic solution in the morning. --TheSandDoctor Talk 06:11, 14 March 2019 (UTC)
- It appears that I was able to implement a fix by using regex first to look and see if there are
tags around the template being removed. If found, they are then removed then the original code executes. {{re|SQL}} could I please have a new trial to trial this fix? --TheSandDoctor Talk 16:24, 14 March 2019 (UTC) - :Sure, let's see another 50. {{BotTrial|edits=50}} SQLQuery me! 04:22, 15 March 2019 (UTC)
- ::{{BotTrialComplete}} {{re|SQL}} There were some issues encountered, but I have changed my programatic approach and the bot has now performed 24 consecutive edits without issue. Instead of preemptively running the text through regular expressions (more error prone), I have switched to running mwparserfromhell (insanely stable, just can't see
tags) and then running it through a single regular expression looking for empty tags (the original problem). Once this change was made, the only issue that arose was not anticipating the "name" field. Once adjusted, it ran fine and the issue has not reappeared. --TheSandDoctor Talk 15:27, 15 March 2019 (UTC) - :::{{u|TheSandDoctor}}, looks like someone has already gotten to all the transclusions.. Galobtter (pingó mió) 15:04, 21 March 2019 (UTC)
- {{ping|TheSandDoctor|SQL}} the template has already been deleted, since all transclusions were removed - this is probably moot now. --DannyS712 (talk) 01:43, 22 March 2019 (UTC)
:{{BotDenied}} as there is nothing left to do as per above. — xaosflux Talk 15:13, 24 March 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.