Wikipedia:Bots/Requests for approval/Theo's Little Bot 2


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

Theo's Little Bot 2
Operator:

Time filed: 00:00, Tuesday April 2, 2013 (UTC)

Automatic, Supervised, or Manual: Automatic

Programming language(s): Python + mwclient

Source code available: github

Function overview: Substitutes Add-desc-I onto talk pages of file uploaders whose file(s) have been tagged with Missing description or one of the redirects to it.

Links to relevant discussions (where appropriate): Requested at Bot_requests

Edit period(s): Continuous/daily-ish, depending on Toolserver delays and such

Estimated number of pages affected: Unknown...large batch with initial run, probably significantly fewer in subsequent ones

Exclusion compliant (Yes/No): Yes

Already has a bot flag (Yes/No): Yes

Function details: The bot goes through every file in Category:Wikipedia files lacking a description: first it gets the initial uploader for the file, and then if the template has not already been delivered to the user, substitutes Add-desc-I to their talk page adds that file to a list of files uploaded by that user that lack a description. Once it has a complete list of uploads for a certain user, it substitutes Add-desc-I (with each of the files in question as an additional parameter) onto their talk page (provided that the user hasn't already been notified in the past 3 days AND that the template isn't currently present on the page).

Discussion

 * Oppose He stole my task. :p It's still April Fools over here. — cyberpower ChatOnline 00:56, 2 April 2013 (UTC)
 * WP:NOTAVOTE, buster. ;) — Theopolisme ( talk )  01:00, 2 April 2013 (UTC)


 * Seriously though, how often will it notify the initial uploader, and how frequently?— cyberpower ChatOnline 00:57, 2 April 2013 (UTC)
 * I've set it to leave a message on the uploader's talk whenever the is not present on their page, although I could also add in some sort of timed delay, if you think that makes sense. I didn't really think it was necessary, initially.. — Theopolisme  ( talk )  01:00, 2 April 2013 (UTC
 * I think a timed delay is necessary. What if the bot adds a notification and the user removes it.  The bot would re-add it immediately.  I think it should count three days from posting before considering posting there again.— cyberpower ChatOnline 01:16, 2 April 2013 (UTC)
 * What happens if a user has uploaded multiple files without descriptions? Is the user notified about all of them or only about the first one? --Stefan2 (talk) 01:17, 2 April 2013 (UTC)
 * It notifies the user about only the first one...but, per Cyber's recommendation, I'm going to add a 3 day time delay function as well. — Theopolisme ( talk )  01:23, 2 April 2013 (UTC)
 * Stefan2 brought up another concern that shoved toward the back of my head temporarily. It would be advisable to generate a notification for each user individual and compile a list of Files in one message so they are alerted about all of them in a single message.— cyberpower ChatOnline 01:26, 2 April 2013 (UTC)
 * It would be great if it could compile a list of files, but if that's too complex, a bunch of messages, one for each, would be ok.  MBisanz  talk 22:03, 2 April 2013 (UTC)
 * Compiling a list of files is a small pain, but it's definitely doable. Give me a day or two to finalize the code (I'll just need to make a dictionary, basically...all it requires is time). Thanks for bearing with me here. — Theopolisme ( talk )  01:24, 3 April 2013 (UTC)
 * ✅ coding...that was quick and painless. :) Can I get the okay for a trial? — Theopolisme ( talk )  22:43, 3 April 2013 (UTC)

 MBisanz  talk 22:53, 4 April 2013 (UTC)
 * See edits listed here. Note that one or two users were notified about the same files more than once because the bot had to be restarted midway through. Thanks! — Theopolisme ( talk )  02:37, 5 April 2013 (UTC)


 * When the bot made its first few edits, it removed everything from the user talk page and added this comment in its place . The later edits look good, so I assume that the bug was fixed. Before actually editing a page, you might wish to make a test run during which the bot only prints the wikicode or the difference to the screen instead of actually changing a page. That may help avoiding bugs like this. --Stefan2 (talk) 15:07, 7 April 2013 (UTC)
 * Yep, the bug was quickly corrected and the said offending edits were reverted by me. — Theopolisme 2  ( talk )  20:26, 7 April 2013 (UTC)
 * Why aren't you using section = new in the edit function? That would avoid such problems.— cyberpower ChatOnline 01:53, 8 April 2013 (UTC)
 * Done here. — Theopolisme ( talk )  00:37, 9 April 2013 (UTC)


 *  MBisanz  talk 01:44, 11 April 2013 (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.