Wikipedia:Bots/Requests for approval/RonBot 5
[[User:RonBot|RonBot 5]]
{{Newbot|RonBot|5}}
Operator: {{botop|Ronhjones}}
Time filed: 15:33, Sunday, June 10, 2018 (UTC)
Automatic, Supervised, or Manual: Automatic
Programming language(s): Python
Source code available: User:RonBot/5/Source1
Function overview: Removal of succession Boxes from Music Articles
Links to relevant discussions (where appropriate): Wikipedia_talk:Manual_of_Style/Record_charts#RfC_on_whether_succession_boxes_should_appear_in_song_and_album_articles via Wikipedia:Bot_requests#Removing_succession_boxes_from_song_and_album_articles
Edit period(s): Large run to start, then a weekly run
Estimated number of pages affected: Initially around 7000
Namespace(s): Mainspace
Exclusion compliant (Yes/No): Yes
Function details: API call for
=Discussion=
{{BotTrial|edits=50}} 25 for songs, 25 for albums. Headbomb {t · c · p · b} 16:12, 11 June 2018 (UTC)
:Mainly good so far, boxes removed as planned, A few wrinkles showed up...
:# It helps to have "return" at the end of a subroutine, doh!
:# Led Zeppelin IV - an "=" on the preceding line, got trapped by the RegEx and removed. RegEx changed to look for 2 to 6 "=" signs, not one.
:# The manual template got added again on a second sweep Hallelujah (Leonard Cohen song) - now checks for its presence and skips.
:# A couple of non-music articles (Film, video game) got caught - they had an "infobox Album" on the same page - now looks for infoboxes that are not song/slbum/single in the article, if found will skip.
:# Difficult to do a second run (I was trialling at 5+5 to start), as wiki obviously does not update it's search index very fast, the second run went through all the files done before - checking each one still has a "S-start" template before processing.
:# Edit summary wrong when just adding the manual template - fixed.
:Above can be seen at Special:Contributions/RonBot 18:51, 11 June 2018 to 20:47, 11 June 2018. Will finish trial tomorrow (should allow wiki's index to catch up). Ronhjones (Talk) 23:24, 11 June 2018 (UTC)
:{{BotTrialComplete}} {{ping|Ojorojo}} Final 20 of trial now run Special:Contributions/RonBot 18:20, 12 June 2018 to 18:21, 12 June 2018. All articles were music ones. The following were found in the search, but were skipped as they had a non-music infobox as well.
:*Howard the Duck (film)
:*Super Mario Galaxy
:*As Good as It Gets
:*Whiplash (2014 film)
:*Precious (film)
:*Half-Life 2
:*Cats (musical)
:Ronhjones (Talk) 18:33, 12 June 2018 (UTC)
::{{ping|Ronhjones}} Edits like these [https://en.wikipedia.org/w/index.php?title=Hound_Dog_(song)&diff=next&oldid=844579768] are rather problematic. Headbomb {t · c · p · b} 18:54, 12 June 2018 (UTC)
:::{{re|Ronhjones}} I checked the skipped film, etc., articles and the succession boxes are not for record charts, so they're OK. The rest look fine, except the one that didn't remove the === headers (I fixed it). I think there's only a few where the succession boxes are in a separate section with "succession" in the header. —Ojorojo (talk) 19:27, 12 June 2018 (UTC)
::::I see that was Hound Dog (song) - back to the RegEx tester! Ronhjones (Talk) 21:50, 12 June 2018 (UTC)
:::::I made that RegEx more complicated than it needed to be (after it selected the single "="), Looks better now. I'll put that revision into a user sandbox and test again. Ronhjones (Talk) 21:56, 12 June 2018 (UTC)
::::::{{ping|Headbomb|Ojorojo}} See https://en.wikipedia.org/w/index.php?title=User:Ronhjones/Sandbox4&diff=prev&oldid=845606912 Ronhjones (Talk) 22:37, 12 June 2018 (UTC)
:::::::{{re|Ronhjones}} Looks good. FWIW, I found about 42 uses of level 2, 3, and 4 headers with "Chart succession".[https://en.wikipedia.org/w/index.php?title=Special:Search&limit=50&offset=0&profile=default&search=hastemplate%3A%22Infobox+song+%22+insource%3A%22%7C%3DChart+succession%7C%22&searchToken=4eihsjvnbwe6kb6u8pswhe1ag][https://en.wikipedia.org/w/index.php?search=hastemplate%3A%22Infobox+album+%22+insource%3A%22%7C%3DChart+succession%7C%22&title=Special:Search&profile=default&fulltext=1&searchToken=81s6lzevrltshxpnpazm7rqhxsearch=hastemplate%3A%22Infobox+song+%22+insource%3A%22%7C%3DChart+succession%7C%22&title=Special:Search&profile=default&fulltext=1&searchToken=5gvdwywr8c20eq07xj0cxaz53] —Ojorojo (talk) 16:30, 13 June 2018 (UTC)
{{BotExtendedTrial|50 edits}} Again 25 songs, 25 albums. I also take it the problematic edits from the previous bot run were reverted/fixed? 18:17, 14 June 2018 (UTC)
:{{BotTrialComplete}}. {{ping|Headbomb|Ojorojo}} All problematic edits from the previous bot run were fixed before run. See Special:Contributions/RonBot 16:11, 15 June 2018 to 16:23, 15 June 2018. All music articles, all look OK to me. Ronhjones (Talk) 16:32, 15 June 2018 (UTC)
::{{re|Ronhjones}} I reviewed the diffs and they look fine. On Imagine though, the succession boxes were removed, but an empty navbox titled "Chart procession and succession" remained.[https://en.wikipedia.org/w/index.php?title=Imagine_(John_Lennon_album)&diff=prev&oldid=846002273] I didn't see that it was added to :Category:Music pages for manual succession box removal, but I fixed it. —Ojorojo (talk) 17:55, 15 June 2018 (UTC)
:::Trouble with public writing articles, they are never consistent. OK, I see the minor issue - I should have looked for
::::{{re|Ronhjones}} Yes, it seems one can always count on one more variation. I though I removed most of the navboxes with succession boxes, but there are 10 with "Chart procession and succession"[https://en.wikipedia.org/w/index.php?search=hastemplate%3A%22Navboxes+%22+insource%3A%22%7CChart+procession%7C%22&title=Special:Search&profile=default&fulltext=1&searchToken=3se53q7stnv3o1rzfv0y2uvs] (similar to Imagine). I can removed these if it's easier. —Ojorojo (talk) 15:26, 16 June 2018 (UTC)
:::::{{ping|Ojorojo}} Since we also want this to run as a weekly check once the bulk have been processed - I'd rather get it right now. Ronhjones (Talk) 16:15, 16 June 2018 (UTC)
::::::Tested in my sandbox4 - now correctly runs - the debug output (below)is OK (the 1 0 above the "writing" indicates 1 Navbox found, and zero Navbox or Navboxes with the closing braces - i.e a Navbox constructed on the page)
main.pagepage
allow bot to edit page
Pages done so far 0
==========================================TOP OF ORIG====================
==========================================BOTTOM OF ORIG====================
1 1 0 0
SStart 1
Manual 0
1 0
writing page tagged manual
++++++++++++++++++++++++++++++++++++++++++++TOP OF NEW+++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++BOTTOM OF NEW++++++++++++++++++++
User:Ronhjones/Sandbox4
Ronhjones (Talk) 15:26, 17 June 2018 (UTC)
{{Re|Ronhjones}} One additional issue is that it often replaces succession boxes with empty lines, e.g. [https://en.wikipedia.org/w/index.php?title=Girls_Just_Want_to_Have_Fun&diff=prev&oldid=846001844], and seems to leave some blank lines alone when it should remove them [https://en.wikipedia.org/w/index.php?title=I_Want_to_Know_What_Love_Is&diff=prev&oldid=846001798]. It should replace them with nothing at all. Headbomb {t · c · p · b} 00:53, 18 June 2018 (UTC)
{{BotExtendedTrial|500 edits}} 250 songs, 250 albums. After the navbox/whitespace issues are resolved. Also, point to this BRFA during the trial for the edit summaries. Headbomb {t · c · p · b} 00:57, 18 June 2018 (UTC)
:OK, I'll check the ones done and see how we can ensure a clean removal. Ronhjones (Talk) 01:40, 18 June 2018 (UTC)
::{{ping|Headbomb}} OK, I've done some dummy runs to make sure I'm picking up the blank line - The code was being deleted from the start of the first line to the final
{{S-start}
{{S-end}}
::So last time we got blanklineA then a blank line (hiding at the end of the "
:::Well, basically everything between start/end of those templates should be purged. And leading/trailing whitespace normalized accordingly. Headbomb {t · c · p · b} 19:47, 19 June 2018 (UTC)
:{{ping|Ojorojo}} I've done a quick 50 trial, just to ensure that the changes to the RegEx went as planned. It seems to be doing all we are asking it to do - Special:Contributions/RonBot 18:14 to 18:21 20th June. Even one succession box found in a navbox and tagged properly. Please have a look at the diffs, if looks good, then I'll scale up. Ronhjones (Talk) 18:28, 20 June 2018 (UTC)
::{{re|Ronhjones}} I looked through all of them and couldn't find any problems. Good to go. —Ojorojo (talk) 19:44, 20 June 2018 (UTC)
:::{{ping|Ojorojo}}Famous last words... Made it up to 250 total, and one tiny, wrinkle... Rivers of Babylon - has a double header before the boxes. Reverted back, so I can trial it when tweaked. The other 249 are fineRonhjones (Talk) 20:18, 20 June 2018 (UTC)
::::Tweaked the code - now deletes both headings (dummy run only), Will do the second lot of 250 tomorrow (after Wiki indexes the pages done properly), including that page Ronhjones (Talk) 20:49, 20 June 2018 (UTC)
{{BotTrialComplete}}{{ping|Ojorojo}} Final 250 in one run. I've looked at them all, they have removed exactly what was required - including the problem Rivers of Babylon with the double headers. Special:Contributions/RonBot 20:07, 21 June 2018 to 20:23, 21 June 2018 Ronhjones (Talk) 20:26, 21 June 2018 (UTC)
:::::{{BotApproved}} I've reviewed a few, and all seem fine with the correct whitespace and everything. Gonna take it on faith that all 500 were fine too. Headbomb {t · c · p · b} 20:36, 21 June 2018 (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.