Wikipedia:Bots/Requests for approval/DYKadminBot
- 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: ~ User:Ameliorate! (with the !) (talk)
Automatic or Manually Assisted: Automatic
Programming Language(s): PHP using ClueBot classes
Function Summary: Automatically updating Template:Did you know
Edit period(s) (e.g. Continuous, daily, one time run): Run on a 5 minute crontab, 4 edits once every 6 hours
Already has a bot flag (Y/N): N
Function Details: The Did you know template is supposed to be swapped once every 6 hours, however due to a lack of administrators working in the area it is often late which results in a backlog of articles and expiring nominations. This is where this bot comes in.
- Any user fills or helps to fill Template:Did you know/Next update with hooks
- Once completed an administrator copies the hooks over to one of the queues
- The bot checks once every 5 minutes if the update is due
- If the template needs to be updated it copies the hooks from the queue page to the main template
- It then clears the queue, resets Template:Did you know/Next update/Time and increments the counter by one
This allows for up to 5 batches of hooks to be set out and for the bot to update them without any further administrator action. The bot will only act on a batch in the queue if it is tagged with {{DYKbotdo}}. The queue that the bot will utilise next is dictated by User:DYKadminBot/count which the bot increases by one as it updates itself.
This has been accepted by those involved in DYK (discussion here) and has done three successful trial runs from my account; [1] [2] [3] [4] and [5] [6] [7] [8] and a run before it was suggested that multiple queues be used; [9] [10] [11]. It will of course need further community discussion and approval.
Discussion
[edit]{{Did you know/Next update}} Should at least be semi-protected, no? BJTalk 12:06, 27 October 2008 (UTC)[reply]
- Template:Did you know/Next update doesn't affect what the bot copies, an administrator has to copy the hooks from that page to one of the fully protected queues; Template:Did you know/Queue/1, Template:Did you know/Queue/2, Template:Did you know/Queue/3, Template:Did you know/Queue/4, Template:Did you know/Queue/5. An admin would have to copy vandalism from the Next update to the queue for it to get onto the main template (and the chances of that happening are the same as the chances of it happening with the current process). ~ User:Ameliorate! (with the !) (talk) 12:12, 27 October 2008 (UTC)[reply]
- I should read more. ;) I don't see any issues, the noticeboards should be spammed and the code should be reviewed. BJTalk 12:31, 27 October 2008 (UTC)[reply]
- Source is available here. ~ User:Ameliorate! (with the !) (talk) 12:48, 27 October 2008 (UTC)[reply]
- I should read more. ;) I don't see any issues, the noticeboards should be spammed and the code should be reviewed. BJTalk 12:31, 27 October 2008 (UTC)[reply]
- support this bot - seems like a good use of limited admin bot functions. --Rocksanddirt (talk) 18:01, 27 October 2008 (UTC)[reply]
- Support, looks a good application to me. Tim Vickers (talk) 18:27, 27 October 2008 (UTC)[reply]
- Support Great solution. Elucidate (parlez à moi) Ici pour humor 18:50, 27 October 2008 (UTC)[reply]
- support ... DYK has wanted a bot to help since... 2006! ++Lar: t/c 19:14, 27 October 2008 (UTC)[reply]
- Support. Hopefully the implementation with the different queues will be a successful one. The rollout with instructions should be made very simple/easy to understand. Cirt (talk) 20:10, 27 October 2008 (UTC)[reply]
- Comment: An admin needs to update the queues, correct? So all this bot would do is update the main page at the correct time? NuclearWarfare contact meMy work 20:18, 27 October 2008 (UTC)[reply]
- Yes, that seems to be how it works. A follow-up question would be, what happens if the queues are all out-of-date or empty? Would the bot add blank or uncomplete stuff to the Main Page in that case? Cirt (talk) 20:22, 27 October 2008 (UTC)[reply]
- According to this, it only works if {{DYKbotdo}} is placed on the page. Is that still the case? NuclearWarfare contact meMy work 20:38, 27 October 2008 (UTC)[reply]
- This is still the case. ~ User:Ameliorate! (with the !) (talk) 02:42, 28 October 2008 (UTC)[reply]
- According to this, it only works if {{DYKbotdo}} is placed on the page. Is that still the case? NuclearWarfare contact meMy work 20:38, 27 October 2008 (UTC)[reply]
- Yes, that seems to be how it works. A follow-up question would be, what happens if the queues are all out-of-date or empty? Would the bot add blank or uncomplete stuff to the Main Page in that case? Cirt (talk) 20:22, 27 October 2008 (UTC)[reply]
- Comment What about adding the notification tag to the article talk page and the nominating and writing users' talk pages? Will/can the bot do that? I know anyone can, but the bot doing it would be easier. Reywas92Talk 20:47, 27 October 2008 (UTC)[reply]
- This bot won't be doing anything outside of admin operation, however I do have another unprivileged bot planned that will do various other DYK maintenance tasks. ~ User:Ameliorate! (with the !) (talk) 02:42, 28 October 2008 (UTC)[reply]
- What's it going to do if the queues are empty and an update is almost due? --Carnildo (talk) 20:48, 27 October 2008 (UTC)[reply]
- Nothing. If the queues are empty, the bot should not have {{DYKbotdo}} on it, so it would not update. Xclamation point 00:17, 28 October 2008 (UTC)[reply]
- I'd suggest it start pinging people madly if we're getting close to update time and the queues are empty. Once this has been running for a while people will tend to rely on it (as with every other adminbot we have), so it needs to have something in place to counter that. Giggy (talk) 05:18, 28 October 2008 (UTC)[reply]
- Nothing. If the queues are empty, the bot should not have {{DYKbotdo}} on it, so it would not update. Xclamation point 00:17, 28 October 2008 (UTC)[reply]
- Support - looks like a step forward. Certainly worth a try anyway. Gatoclass (talk) 02:53, 28 October 2008 (UTC)[reply]
- Support - finally, something to help you poor DYK admins... :) —Ed 17 for President Vote for Ed 05:11, 28 October 2008 (UTC)[reply]
- Support: Always thought this was the best way to do it. It reduces the burden of the DYK Admins -- Tinu Cherian - 05:34, 28 October 2008 (UTC)[reply]
- This is not a vote. It is a discussion. I have the feeling that this is slowly going to turn into an rfa :-( It is very hard to read the real concerns inside the votes --Chris 08:29, 28 October 2008 (UTC)[reply]
- While I am happy with the level of support this has got, I have to agree. ~ User:Ameliorate! (with the !) (talk) 10:12, 28 October 2008 (UTC)[reply]
- This is not a vote. It is a discussion. I have the feeling that this is slowly going to turn into an rfa :-( It is very hard to read the real concerns inside the votes --Chris 08:29, 28 October 2008 (UTC)[reply]
- Seems fine. No issues. Stifle (talk) 12:05, 28 October 2008 (UTC)[reply]
- Regarding the code, here are some problems I found:
if(!preg_match("/{{DYKbotdo}}/i",$queue)) die("Hooks have not been approved by an administrator.");
should be changed toif(!preg_match("/\{\{DYKbotdo\}\}/i",$queue)) die("Hooks have not been approved by an administrator.");
$content = preg_replace("/{{DYKbotdo}}/i", "", "$create_content");
to$content = preg_replace("/\{\{DYKbotdo\}\}/i", "", "$create_content");
- Xclamation point 12:20, 28 October 2008 (UTC)[reply]
- Fixed. Thanks, ~ User:Ameliorate! (with the !) (talk) 12:55, 28 October 2008 (UTC)[reply]
- Comments - Since the queue page which admins need to put hooks onto for the next update increases by one each time (until it hits '6' and resets to '1') I'd suggest putting links to the current 'next update queue' on Template:DYK-Refresh and various other 'high visibility' spots so people can easily check what is 'on deck'. Similarly, a category could be transcluded through {{DYKbotdo}} to display all pages which are currently marked to be auto-updated by the bot. Also, the bot relies on Template:Did you know/Next update/Time containing the timestamp as a single number, which is a fairly new change. It seems to have been accepted, but the similar Template:In the news/Next update/Time still uses the old system and someone might try to re-synch them up or otherwise change the timestamp template. Thus, a note should be added indicating that changes to that template (and the counter / queues) could mess up the bot. Finally, it'd probably be a good idea to revise the instructions for manual updates to include info on updating the counter so that if the bot is ever down / someone has to do a manual update it can be performed in a way that won't then throw the bot off. --CBD 18:18, 28 October 2008 (UTC)[reply]
- Those seem good things to note/do/watch out for ++Lar: t/c 03:41, 30 October 2008 (UTC)[reply]
- Any comments (from the botop or others...) on what it should do if the queue is empty close to update time? (wrt. comments a bit higher up) Giggy (talk) 22:44, 28 October 2008 (UTC)[reply]
- I changed my test copy to post to Wikipedia talk:DYK and leave a note on Template:Did you know/Next update. Perhaps it could also post to Wikipedia:AN after the update is a certain period of time late, an hour? Two hours? ~ User:Ameliorate! (with the !) (talk) 00:41, 29 October 2008 (UTC)[reply]
- I think an AN post if there's an hour to go would be a good idea. Giggy (talk) 06:40, 29 October 2008 (UTC)[reply]
- I think a notice somewhat "early" is better than "late". So an hour or two to go before update due and there's still nothing in next update means at least there is time to get the pipeline filled... given the volume of suggestions the point here is to never miss an update even by an hour so the maximum number of suggestions are achieved. Heck... I'd say if the pipeline (which is 6 units long) ever falls to less than 2 units ready to go some sort of notice somewhere might be in order... ++Lar: t/c 03:41, 30 October 2008 (UTC)[reply]
- I think an AN post if there's an hour to go would be a good idea. Giggy (talk) 06:40, 29 October 2008 (UTC)[reply]
- I changed my test copy to post to Wikipedia talk:DYK and leave a note on Template:Did you know/Next update. Perhaps it could also post to Wikipedia:AN after the update is a certain period of time late, an hour? Two hours? ~ User:Ameliorate! (with the !) (talk) 00:41, 29 October 2008 (UTC)[reply]
- Question: if this works, will there be thought given to how notification/credits might be automated too? tis' a bit trickier to do since there are a fair few permutations of nom/author/selfnom/conom/hook tweaker :)... etc... And archiving too, of course. ++Lar: t/c 03:41, 30 October 2008 (UTC)[reply]
- Please don't post to AN. The reason that obnoxious color-changing box transcluded on Talk:Main Page and various other locations was created was so that people wouldn't keep posting to AN whenever DYK was getting behind schedule. It was getting really annoying for a while. Posts on Wikipedia:AN aren't archived for 48 hours, such messages will be irrelevant after 20 minutes. Mr.Z-man 04:12, 1 November 2008 (UTC)[reply]
- If it does post to AN the message will ask that it be removed from the board after the update is done. This is necessary as the bot will have to detect an HTML comment in the message to know if has already posted, otherwise it will make a new post every 5 minutes. So theoretically the posts will be removed after 20 minutes. ~ User:Ameliorate! (with the !) (talk) 04:38, 1 November 2008 (UTC)[reply]
- Please don't post to AN. The reason that obnoxious color-changing box transcluded on Talk:Main Page and various other locations was created was so that people wouldn't keep posting to AN whenever DYK was getting behind schedule. It was getting really annoying for a while. Posts on Wikipedia:AN aren't archived for 48 hours, such messages will be irrelevant after 20 minutes. Mr.Z-man 04:12, 1 November 2008 (UTC)[reply]
Comment: (crossposted from ameliorate's talk page): I do think we need to think a little more about how to implement this though. For example, all those extra queued pages are not going to be much use for preparing updates ahead of time because there is nowhere to include the credits. I'm now thinking maybe we should just duplicate the "next update" page completely on each queue page and then just get the bot to select the hook section from the page. IMO things would be a lot more straightforward that way. Gatoclass (talk) 09:56, 31 October 2008 (UTC)[reply]
- My biggest fear there is that someone will change the formatting of the page for whatever reason, and if they don't know what they're doing it will cause problems (we get this now with the various helper bots that malfunction every time someone changes instructions to not a subst a template or alters the formatting of a page like Wikipedia:CHU). The only alternative for credits is that we have a list on the main Next update page for each queue, but I think you are right that it would be better to maintain consistent formatting across the DYK pages. Also, the update would still have to be prepared on the unprotected Next update, it isn't fair to the non-admins who help with the next update occasionally otherwise. ~ User:Ameliorate! (with the !) (talk) 05:54, 1 November 2008 (UTC)[reply]
- The bot now posts to Wikipedia:AN one hour before the update is due if the next queue isn't approved and works if the queue pages are replicas of the next update page. ~ User:Ameliorate! (with the !) (talk) 16:29, 1 November 2008 (UTC)[reply]
{{BAGAssistanceNeeded}} Since the discussion has abated could this be approved for a trial? Unless there are outstanding concerns. ~ User:Ameliorate! (with the !) (talk) 14:26, 7 November 2008 (UTC)[reply]
Approved for trial (14 days). Please provide a link to the relevant contributions and/or diffs when the trial is complete. To be run on your account. BJTalk 03:21, 8 November 2008 (UTC)[reply]
- In addition, please add {{Sign3647}} to the edit summaries. @BAG members: Please remember to specify a template to use when you approve a trial for an adminbot! Per Wikipedia:ADMINBOT, this must be done so! Xclamation point 04:28, 8 November 2008 (UTC)[reply]
- Um, what? BJTalk 06:54, 8 November 2008 (UTC)[reply]
- Bot policy says trialed adminbots are to be run with edits clearly marked as such, so it can be separated by a SQL query. Xclamation point 15:36, 8 November 2008 (UTC)[reply]
- There's no "SQL query" requirement, just that the bot edits must be clearly marked. Putting "Bot edit" in the summary is sufficient. --Carnildo (talk) 23:12, 8 November 2008 (UTC)[reply]
- It still makes it helpful... Is there any harm to it? It helps when reviewing the edits. Xclamation point 23:15, 8 November 2008 (UTC)[reply]
- There's no "SQL query" requirement, just that the bot edits must be clearly marked. Putting "Bot edit" in the summary is sufficient. --Carnildo (talk) 23:12, 8 November 2008 (UTC)[reply]
- Bot policy says trialed adminbots are to be run with edits clearly marked as such, so it can be separated by a SQL query. Xclamation point 15:36, 8 November 2008 (UTC)[reply]
- Um, what? BJTalk 06:54, 8 November 2008 (UTC)[reply]
Trial complete. ~ User:Ameliorate! (with the !) (talk) 14:50, 22 November 2008 (UTC)[reply]
- Approved. +admin approved --uǝʌǝsʎʇɹoɟʇs(st47) 11:41, 25 November 2008 (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.