Wikipedia:Bots/Requests for approval/DannyS712 bot 68
- The following discussion is an archived debate. Please do not modify it. To request review of this BRFA, please start a new section at WT:BRFA. The result of the discussion was Approved.
Operator: DannyS712 (talk · contribs · SUL · edit count · logs · page moves · block log · rights log · ANI search)
Time filed: 22:45, Sunday, February 23, 2020 (UTC)
Automatic, Supervised, or Manual: automatic
Programming language(s): Javascript
Source code available: https://github.com/DannyS712/bot
Function overview: Allows users to schedule reminders for themselves in a userspace json page, and post those reminders to a user's talk page
Links to relevant discussions (where appropriate):
Edit period(s): Daily
Estimated number of pages affected: User talk pages of users that opt in
Exclusion compliant (Yes/No): No
Already has a bot flag (Yes/No): No
Function details:
I figured out a sane way to allow users to schedule reminders and have them processed. I haven't done any coding yet, but wanted to open this for discussion.
- User, via script (to be written) adds an entry to User:Example/reminders.json with the day for the reminder, and the text to include
- User page is in a tracking category or transcluded a specific template to track which users are using the service
- Each day, bot retrieves all user pages in the category/with the template, converts "User:Example" with "User:Example/reminders.json", retrieves the json page, and parses to see if any reminders where scheduled for that day
- If any were, post to "User talk:Example"
Reminders can only be scheduled by the owner (or an admin editing the owners json page, but why would anyone?)
- User is responsible for removing old reminders from their /reminders.json page, but the bot only checks to see if there are reminders for "today" (UTC at noon) and so doesn't care if there are old ones left
Discussion
[edit]Is there a specific reason for using .json? I know that these are (along with JS and CSS) the only pages that are protected in user-and-some-privileged-groups mode, but I wonder if there are other ways to accomplish this. I know there are tasks at Phabricator to create a feature, but I am not sure if programming that is better or worse than programming a bot for the meantime. Jo-Jo Eumerus (talk) 23:05, 23 February 2020 (UTC)[reply]
- @Jo-Jo Eumerus: so that other people don't edit them, and to make it easier for the bot to parse DannyS712 (talk) 23:08, 23 February 2020 (UTC)[reply]
I see you didn't fill anything into the "Links to relevant discussion" section. A quick search turned up several pages, of which Wikipedia:Bots/Requests for approval/RemindMeBot seems the most comprehensive. As mentioned there, it might be more functional all around to tie this into Echo somehow, storing pending reminders in a properly indexed database table and so on. Anomie⚔ 14:20, 24 February 2020 (UTC)[reply]
- @Anomie: sure, but phab:T156808 hasn't had any progress. If it is implemented I'll stop the bot DannyS712 (talk) 18:35, 25 February 2020 (UTC)[reply]
- I am inclined to approve this for a trial, but am not sure what criteria would be best for its completion. @DannyS712: do you have any preference/suggestions? @Anomie:, do you have any objections seeing as how phab:T156808 hasn't had any traction and if this task is retired once the phab ticket completed/implemented (could take years before someone takes it up)? --TheSandDoctor Talk 20:50, 7 March 2020 (UTC)[reply]
- @TheSandDoctor: maybe just a proof of concept that it works? I'll use DannyS712 and DannyS712 test. Haven't written the code yet... DannyS712 (talk) 21:08, 7 March 2020 (UTC)[reply]
- @TheSandDoctor: Don't let me hold things up. I think it'd be better if it could be integrated into Echo, and from what I've seen DannyS712 could probably write that code (given code review from the appropriate WMF team), but if they'd rather do it as a bot I won't stand in the way. Anomie⚔ 21:48, 7 March 2020 (UTC)[reply]
- Needs wider discussion. I was going to send this to trial based on the above discussion, but Danny does not require bot approval to use this bot (or its features) in his own user space. In other words, if no one else would actually use this, then there is no point in approving this task in the first place. I think a post at the Village Pump or other semi-centralized discussion, even to see if there is an interest, would be preferred before sending this to trial. Primefac (talk) 19:57, 15 March 2020 (UTC)[reply]
- Posted to technical village pump DannyS712 (talk) 17:32, 23 March 2020 (UTC)[reply]
- I think it's important to know that with this approach, your reminders are world-readable. I imagine this wouldn't satisfy some use cases; Say I wanted to remind myself to check on a new user in a few days, as I suspect they are an LTA. I wouldn't want this reminder in the form of a talk page message. I don't think this came up at Wikipedia:Bots/Requests for approval/RemindMeBot, so maybe most users aren't worried about it. Yair rand's suggestion at VPT was to implement a gadget, storing the reminders privately using the Options API, which seems more appropriate for this kind of task. — MusikAnimal talk 21:28, 23 March 2020 (UTC)[reply]
- @MusikAnimal: The gadget idea is indeed a good one, but not something I am capable of creating; until such a gadget exists, this would be better than nothing DannyS712 (talk) 23:15, 23 March 2020 (UTC)[reply]
- @DannyS712: You of all people I think are capable! :) You used the options API for your global watchlists gadget, right? The timing checks would be similar to User:SD0001/T-Watch.js (which also uses the options API), perhaps that script could offer some clues. I still have no opposition to the bot idea, if that's your preference.
- If you do decide to go with a bot, can you confirm this task will be ran via a cron job, and not manually triggered? — MusikAnimal talk 01:02, 24 March 2020 (UTC)[reply]
- @MusikAnimal: Nope, not using the options api for global watchlist (at least not yet); bot will be run via a cron job, yes DannyS712 (talk) 01:07, 24 March 2020 (UTC)[reply]
- @MusikAnimal: The gadget idea is indeed a good one, but not something I am capable of creating; until such a gadget exists, this would be better than nothing DannyS712 (talk) 23:15, 23 March 2020 (UTC)[reply]
- Approved for trial (10 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete. Please link them here when the trial is complete. For the sake of making sure this works, please don't just spam 10 reminders and call it good. Primefac (talk) 14:00, 15 April 2020 (UTC)[reply]
- ...time to write the code now DannyS712 (talk) 15:06, 15 April 2020 (UTC)[reply]
- I've written the basic code and made three edits so far (side note: can an admin or edit filter manager please add the "bot trial" tag to [1] and [2] to help me keep track of the edits the bot makes as part of the trial?) Next up is setting up a method for users to opt in to getting reminders, and sharing the script I developed for saving reminders. I'll include a mention of it in the next issue of WP:Scripts++ at the end of the month, and will likely request an extended trial. For now, I'm just focusing on figuring out how users should be able to opt in DannyS712 (talk) 07:41, 20 April 2020 (UTC)[reply]
- Tagged — JJMC89 (T·C) 07:50, 20 April 2020 (UTC)[reply]
- Thanks. https://wiki.riteme.site/w/index.php?target=DannyS712+bot&namespace=3&tagfilter=bot+trial&start=&end=&limit=1000&title=Special%3AContributions now shows the edits for this trial DannyS712 (talk) 07:58, 20 April 2020 (UTC)[reply]
- Tagged — JJMC89 (T·C) 07:50, 20 April 2020 (UTC)[reply]
- Trial complete. @Primefac: I only made 6 edits (https://wiki.riteme.site/w/index.php?target=DannyS712+bot&namespace=3&tagfilter=bot+trial&start=&end=&limit=1000&title=Special%3AContributions) but I have now finalized the implementation (I hope) - reminders are sent based on user pages transcluding {{PleaseRemindMe}}. The next step would be running it automatically via cron, but I wouldn't know how many edits it would make, since I don't know how quickly it will be adopted. Can this go for an extended trial (eg 3 weeks rather than a number of edits)? DannyS712 (talk) 02:54, 23 April 2020 (UTC)[reply]
- Approved for extended trial (21 days). Please provide a link to the relevant contributions and/or diffs when the trial is complete. Primefac (talk) 14:23, 2 May 2020 (UTC)[reply]
- @Primefac: I have started the bot, and will disable the cron task in 3 weeks (scheduling a reminder - bot will tell me to stop :) ) Thanks, --DannyS712 (talk) 06:04, 5 May 2020 (UTC)[reply]
- Genuine question - is there an advantage of using this method over just using JavaScript, like the implementation SD0001 did with W-Ping? Naypta ☺ | ✉ talk page | 20:30, 15 May 2020 (UTC)[reply]
- @Naypta: See the discussion on the talk page - this triggers email notifications, cross-wiki notifications, and doesn't rely on the user logging in to send the message DannyS712 (talk) 20:46, 15 May 2020 (UTC)[reply]
- @DannyS712: will adding {{PleaseRemindMe}} to my talk page work? My user page is global. - Alexis Jazz 05:20, 21 May 2020 (UTC)[reply]
- @Alexis Jazz: It will in a few minutes DannyS712 (talk) 05:21, 21 May 2020 (UTC)[reply]
- Should be done DannyS712 (talk) 05:32, 21 May 2020 (UTC)[reply]
- @Alexis Jazz: It will in a few minutes DannyS712 (talk) 05:21, 21 May 2020 (UTC)[reply]
- Trial complete. I didn't see any issues. Not sure how much of a success this was in terms of adoption, but I still found it useful --DannyS712 (talk) 18:19, 25 May 2020 (UTC)[reply]
- I was actually just going to use it, so hope approval comes soon :) --Mdaniels5757 (talk) 17:43, 26 May 2020 (UTC)[reply]
Approved. Looks good to me. No sense in holding this up any longer. The condition on this approval is that if phab:T156808 and its front-end is ever implemented, as you have said before, you stop this bot as it would become redundant. As per usual, if amendments to - or clarifications regarding - this approval are needed, please start a discussion on the talk page and ping. --TheSandDoctor Talk 05:20, 27 May 2020 (UTC)[reply]
- 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.