Commons:Bots/Requests/Hazard-Bot 17

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Hazard-Bot (talk · contribs) [17]

Operator: Hazard-SJ (talk · contributions · Statistics · Recent activity · block log · User rights log · uploads · Global account information)

Bot's tasks for which permission is being sought: Removing empty daily sections from Commons:Village pump

My bot currently adds these sections daily, and the purpose of this request is to seek approval to also remove them once all their subsections are archived.
The level 1 headings were being incorrectly archived by ArchiverBot as part of the preceding level 2 section, as described in this discussion. In order to continue having the dated sections, but not have them being incorrectly archived, the User:SpBot is currently archiving the VP.
However, regardless of which bot does the archival, if both bots leave the level 1 section heading behind, then they will need to be manually removed (e.g. Special:Diff/347530623, Special:Diff/347675949, Special:Diff/348857696, Special:Diff/348554724, etc.).

I am seeking permission to have my bot also remove these sections if they are empty (and not for the current day).

Automatic or manually assisted: automatic

Edit type (e.g. Continuous, daily, one time run): daily

Maximum edit rate (e.g. edits per minute): under 5 edits per day (and usually not that many) - depending on how frequently the page is archived, I'll try to have it run fairly close in trail to reduce the amount of time the empty sections sit around, so this may get tweaked based on which bot is archiving etc.

Bot flag requested: (Y/N): N

Programming language(s): Python

See Commons talk:Village_pump#First section header (permalink above) for the current discussion about this issue. Hazard SJ 21:29, 5 May 2019 (UTC)[reply]

Discussion

@Whym: For a setup like in the VP and HD the ArchiveBot is not necessary at all, but SpBot does not support all of the Miszabot config features.
@Hazard-SJ: For the test run as requested by Eugene you could set the timeout span for SpBot to 7 days like it was set up before (I’ve set it to 14; I would be happy if you’d let a notice for me about this). Then you wait for SpBot’s job, so you should get plenty of empty level 1 sections and could test your bot. — Speravir – 00:14, 9 May 2019 (UTC)[reply]
@Speravir: Done just now, thanks for the suggestion.  Hazard SJ  17:21, 13 May 2019 (UTC)[reply]
I see. While I might try fixing it later, I'm happy with the current setup of VP that does not contain ArchiverBot, to be clear. whym (talk) 11:43, 14 May 2019 (UTC)[reply]
@EugeneZelenko and Hazard-SJ: The test run was successful: Special:Diff/350162226/350162432. Is this enough or should there be more of these? — Speravir – 16:42, 14 May 2019 (UTC)[reply]
Looks OK for me. You could differentiate edit summaries for section adding and removal, but this is not critical. --EugeneZelenko (talk) 13:51, 15 May 2019 (UTC)[reply]
I actually planned to do that (I’m already keeping track of how many sections were removed and whether or not a new section was added), but haven’t gotten around to fully testing and implementing that into the summary as yet. Technically, a single edit could contain removals and an addition. I hope to look more into that in a week or so when I should have more time to finish that up; I could get back to you when that’s done.  Hazard SJ  18:10, 16 May 2019 (UTC)[reply]
Even for addition and removal in single edit you could list added and removed sections. --EugeneZelenko (talk) 14:23, 18 May 2019 (UTC)[reply]
From my point of view the Bot seems to reliably delete only empty sections. Hazard mentioned some intended changes, though. As Eugene wrote, distinct summaries for the two different jobs would be more user friendly. — Speravir – 01:25, 29 May 2019 (UTC)[reply]
@Hazard-SJ: Can the requested changes be implemented? --Krd 13:46, 2 June 2019 (UTC)[reply]
Should be done now, sorry about the delay.  Hazard SJ  17:32, 9 June 2019 (UTC)[reply]

Approved. --Krd 12:18, 19 June 2019 (UTC)[reply]