Commons:Bots/Requests/AmaureaUploadBot

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

AmaureaUploadBot (talk · contribs)

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

Bot's tasks for which permission is being sought: Image upload. This bot will periodically update my graphs of opinion poll data for Norwegian elections with new data from PollOfPolls. There are currently 12 such plots - one per political party and 3 overview plots. Examples of such plots (made by User:Amaurea) can be found here [1]. And here is an example of what one of these plots looks like on commons. The reason for continuously reuploading these images is that new polls become available every few days, causing the plots to grow by a few data points.

Automatic or manually assisted: Automatic

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

Maximum edit rate (e.g. edits per minute): 12

Bot flag requested: (Y/N): N

Programming language(s): Python. The bot is a ~100 line python script that uploads the graphs using the API using the requests module in python. I would run a daily cron job that collects the new data, updates the plots, and then runs the upload script.

Amaurea (talk) 21:56, 23 March 2019 (UTC)[reply]

Discussion

I have 654 edits on the English Wikipedia, where I've been registered since 2005. My edits both there and here have been constructive. But I guess that to super-users like you, that counts as "only 654 edits" and "only registered since 2005". I did find the whole automation process on commons mysterious: Which things require bot accounts and which require special bot-passwords. The whole bot process seems overkill for simply keeping a few figures up to date, but going through the manual process every few days it too cumbersome to be worth it. I read through the instructions I found, but given your helpful comment I understand that I must have missed something. I don't know what, though. Amaurea (talk) 08:05, 24 March 2019 (UTC)[reply]
@Amaurea: In this edit, you transcluded in the wrong place (bottom, rather than top),   — Jeff G. please ping or talk to me 16:28, 24 March 2019 (UTC)[reply]
@Jeff G.: I see. I'm sorry about that, and thanks for pointing it out. Amaurea (talk) 16:34, 24 March 2019 (UTC)[reply]
@Amaurea: You're welcome. So your bot would make 12 edits in a minute or two, and sleep until triggered the next day? Is the script open source?   — Jeff G. please ping or talk to me 16:50, 24 March 2019 (UTC)[reply]
@Jeff G.: Yes, that's right. It's very low activity, and touches the same files every time. You can see the script here [2]. It's very minimal, so it should be easy to follow. Amaurea (talk) 17:21, 24 March 2019 (UTC)[reply]
It's 12 files being reuploaded each day, not just one. But it's not that I particularly want a dedicated account. I thought that a bot account was *required* for automated activity. If I can do this without one, then that's great! Amaurea (talk) 14:45, 24 March 2019 (UTC)[reply]
  •  Support It seems that the files meet our polices (scope and copyright), and being uploaded with an automated process (cron), a bot account would be better. Regards, Yann (talk) 16:14, 24 March 2019 (UTC)[reply]
  • I think it's perfectly appropriate to use a bot account for this. I have a few suggestions, though: The files affected by this bot should be tagged with {{Current}}, or otherwise labelled to indicate that the bot will overwrite them. The bot should update the "Date" field of {{Information}} after each upload to keep it accurate. The bot should write something in the upload comment (the comment field in the API) for each upload. Finally, the bot's user page should include a link to the source code. I think all of these apart from updating the date should be trivial to implement. If you can't easily update the date, it might be better to omit it entirely. --bjh21 (talk) 11:51, 29 March 2019 (UTC)[reply]
@Bjh21: The bot actually already passes the current date to the information template. The reason why on older date is displayed in the files is that the bot isn't currently running, since I haven't gotten permission to run it automatically yet. I've added a comment field now, with the text "Newest version as of DATE, auto-generated by BOT". I'll update the text with {{Current}} and the bot page with the source code when the web server with the code on is back up from maintenance, probably in a few days. Amaurea (talk) 15:15, 31 March 2019 (UTC)[reply]

Approved. --Krd 04:53, 2 April 2019 (UTC)[reply]