Commons:Bots/Requests/JeffGBot 3

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

JeffGBot (talk · contribs) 3

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

Bot's tasks for which permission is being sought:

Automatic or manually assisted: Manually assisted for trial, automatic with bot flag

Edit type (e.g. Continuous, daily, one time run): One time runs at the discretion of the operator

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

Bot flag requested: (Y/N): Y

Programming language(s): COM:AWB or COM:JWB

  — Jeff G. ツ please ping or talk to me 09:40, 27 February 2018 (UTC)[reply]

Discussion

You're not wrong, EXIF data itself should be fixed. There is plenty of work in Category:Exif maintenance for a bot operator to do such a task but as Jeff said, it is outside the scope of this request. I think it is vital this template gets on files as soon as possible to prevent unjust DRs or speedy deletions of valid files and this task is available to do so at this time. Long term, I look forward to an EXIF bot running regularly for whichever operator wishes to take on that difficult challenge. ~riley (talk) 21:08, 1 March 2018 (UTC)[reply]

Bot trial
  • @Jeff G.: I don't believe File:Bhagavad gita.jpg and File:Bhagavad gita tempel-mandap.jpg ran as intended. If you are doing find and replace based on the license, I wouldn't recommend going about it that way. I would find and replace it to the licensing header using regex as you have done in File:Children enjoying board games.jpg, however, I would adjust your regex. I think the best option here is for the find expressionr to be (==\s*\{\{int:license-header\}\}\s*==) and replace be $1\n{{wrong exif|[[:en:Spreadtrum|Spreadtrum]]|File:Spreadtrum logo graphic.svg}}. Be adding the brackets around your expression, you can recall it as group 1 in your replace expression which also stops you from removing spaces in the licensing header like you are doing in Special:Diff/289930301. Everything else looks great otherwise, I'd just experiment with the regex for some edits. Play around with the regex here. ~riley (talk) 21:50, 1 March 2018 (UTC)[reply]
    @~riley: File:Bhagavad gita.jpg and File:Bhagavad gita tempel-mandap.jpg did run as intended, to the point where I found no licensing header, so I improvised and put the wrong exif template just before the license, as I had been doing in the other file description pages, just on the same line in the permission field (I verified that this looked ok before continuing). While editing some pages, I did remove some extraneous spaces separating equal signs from license header internationalization because they were extraneous; I didn't think that would be an issue, but I can certainly stop doing it. The same applies to my removal of some extraneous blank lines (leaving one before the cats). I was unaware of the usability of $1 to represent the find expression in the replace expression, thanks for telling me about it.   — Jeff G. ツ please ping or talk to me 00:55, 2 March 2018 (UTC)[reply]
    Good improvising then, although I think theres a better way to do this. I had a similar task that ran into this error and in that case, I ended up adding in my own licensing section. That is hard to do in AWB, so in this case I would make another find and replace expression (with after fixes checked) using the following expression, find:(\{\{Information(\n*\|.*)*\n*(\}\})*) and replace: $1\n{{wrong exif|[[:en:Spreadtrum|Spreadtrum]]|File:Spreadtrum logo graphic.svg}}. Play with it here; its your decision on what works better for your bot. As for the spacing, we want to maintain whatever is in place already when using find and replace, any other AWB autofixes are appropriate to maintain. $ will link to whatever groups you have (decided by whats in brackets) in numerical value, which can be very helpful and sometimes you're using $1 all the way to $5. ~riley (talk) 01:24, 2 March 2018 (UTC)[reply]
    @~riley: Ok, thanks. Can VFC use these groups, too? For this task, it seems "Script cannot find any file / initial upload in / by User:JeffGBot/Run1files." JeffGBot (talk) 11:44, 2 March 2018 (UTC)[reply]
    Not sure if you can use VFC for complex regex, haven't tried. You need to remove the colon between the brackets and File so that the images display (I.e. User:~riley/List, and select "Full page name" when starting VFC up. Then it will work for finding the files. ~riley (talk) 19:12, 2 March 2018 (UTC)[reply]
    @~riley: So do you want me to do any more test runs or anything? I would also like to use the bot for uploading.   — Jeff G. ツ please ping or talk to me 04:17, 5 March 2018 (UTC)[reply]
    @Jeff G.: Tasks should be separated. Once this is closed, I recommend you open a new one when ready. You're good to start testing for the task in a controlled manner at your convenience. ~riley (talk) 04:58, 5 March 2018 (UTC)[reply]

Administrator note: If there is no objection from the community, it is my recommendation that this task be approved and the bot flagged. ~riley (talk) 04:58, 5 March 2018 (UTC)[reply]

Approved. --Krd 11:43, 13 March 2018 (UTC)[reply]