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 Symbol keep vote.svg Approved.

DYKadminBot
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.
 * 1) Any user fills or helps to fill Template:Did you know/Next update with hooks
 * 2) Once completed an administrator copies the hooks over to one of the queues
 * 3) The bot checks once every 5 minutes if the update is due
 * 4) If the template needs to be updated it copies the hooks from the queue page to the main template
 * 5) 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;    and     and a run before it was suggested that multiple queues be used;. It will of course need further community discussion and approval.

Discussion
Did you know/Next update Should at least be semi-protected, no? BJ Talk 12:06, 27 October 2008 (UTC)
 * 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)
 * I should read more. ;) I don't see any issues, the noticeboards should be spammed and the code should be reviewed. BJ Talk 12:31, 27 October 2008 (UTC)
 * Source is available here. ~ User:Ameliorate!  (with the !) (talk) 12:48, 27 October 2008 (UTC)


 * support this bot - seems like a good use of limited admin bot functions. --Rocksanddirt (talk) 18:01, 27 October 2008 (UTC)
 * Support, looks a good application to me. Tim Vickers (talk) 18:27, 27 October 2008 (UTC)
 * Support Great solution. Elucidate (parlez à moi) Ici pour humor 18:50, 27 October 2008 (UTC)
 * support ... DYK has wanted a bot to help since... 2006! ++Lar: t/c 19:14, 27 October 2008 (UTC)
 * 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)
 * 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 me My work  20:18, 27 October 2008 (UTC)
 * 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)
 * According to this, it only works if is placed on the page. Is that still the case?  NuclearWarfare  contact me My work  20:38, 27 October 2008 (UTC)
 * This is still the case. ~ User:Ameliorate!  (with the !) (talk) 02:42, 28 October 2008 (UTC)
 * 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.   Reywas92 Talk  20:47, 27 October 2008 (UTC)
 * 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)


 * 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)
 * Nothing. If the queues are empty, the bot should not have on it, so it would not update. X  clamation point  00:17, 28 October 2008 (UTC)
 * 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)
 * Support - looks like a step forward. Certainly worth a try anyway. Gatoclass (talk) 02:53, 28 October 2008 (UTC)
 * Support - finally, something to help you poor DYK admins... :) — Ed 17   for President  Vote for Ed  05:11, 28 October 2008 (UTC)
 * 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)
 * 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)
 * 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)


 * Seems fine. No issues. Stifle (talk) 12:05, 28 October 2008 (UTC)
 * Regarding the code, here are some problems I found:
 * if(!preg_match("//i",$queue)) die("Hooks have not been approved by an administrator."); should be changed to if(!preg_match("/\{\{DYKbotdo\}\}/i",$queue)) die("Hooks have not been approved by an administrator.");
 * $content = preg_replace("//i", "", "$create_content"); to $content = preg_replace("/\{\{DYKbotdo\}\}/i", "", "$create_content");
 * X clamation point  12:20, 28 October 2008 (UTC)
 * Fixed. Thanks, ~ User:Ameliorate!  (with the !) (talk) 12:55, 28 October 2008 (UTC)


 * 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 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)
 * Those seem good things to note/do/watch out for ++Lar: t/c 03:41, 30 October 2008 (UTC)
 * 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)
 * 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 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)
 * 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)
 * 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)


 * 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)
 * 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 AN aren't archived for 48 hours, such messages will be irrelevant after 20 minutes. Mr.Z-man 04:12, 1 November 2008 (UTC)
 * 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)

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)
 * 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 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)


 * The bot now posts to 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)

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)

To be run on your account. BJ Talk 03:21, 8 November 2008 (UTC)
 * In addition, please add to the edit summaries. @BAG members: Please remember to specify a template to use when you approve a trial for an adminbot! Per ADMINBOT, this must be done so! X  clamation point  04:28, 8 November 2008 (UTC)
 * Um, what? BJ Talk 06:54, 8 November 2008 (UTC)
 * Bot policy says trialed adminbots are to be run with edits clearly marked as such, so it can be separated by a SQL query. X clamation point  15:36, 8 November 2008 (UTC)
 * 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)
 * It still makes it helpful... Is there any harm to it? It helps when reviewing the edits. X clamation point  23:15, 8 November 2008 (UTC)

~ User:Ameliorate!  (with the !) (talk) 14:50, 22 November 2008 (UTC)


 * +admin approved --uǝʌǝsʎʇɹoɟʇs (st47) 11:41, 25 November 2008 (UTC)


 * 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.