Commons:Bots/Requests/AntiCompositeBot 4

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

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

Bot's tasks for which permission is being sought: Automatically tag files without a license for deletion. (Commons:Bots/Work_requests#Files_without_licenses)
The bot uses a query similar to https://quarry.wmflabs.org/query/44935 to find potentially eligible files that are in Category:Files_with_no_machine-readable_license, were uploaded in the last 1 month, and are not currently tagged for deletion. The restriction on upload time is to prevent the bot from tagging files that may have previously had a license or otherwise need human review.
As a safety measure against replag and poorly-coded templates, the bot will check for {{Deletion template tag}} and {{License template tag}} using the API before tagging the page. If neither are found, it will tag the file with {{subst:nld}} and notify the uploader with {{subst:Image license}}. Most configuration is stored on-wiki at User:AntiCompositeBot/NoLicense/Config.json. The code is available at https://github.com/AntiCompositeNumber/AntiCompositeBot/blob/master/src/nolicense.py.

Automatic or manually assisted: Automatic

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

Maximum edit rate (e.g. edits per minute): 1 burst per hour, 1 minute between files in a burst (No added delay between tagging and notification)

Bot flag requested: (Y/N): Edits will not be marked as bot edits.

Programming language(s): Python/Pywikibot

AntiCompositeNumber (talk) 03:42, 2 June 2020 (UTC)[reply]

Discussion

Now bot notifies user about each problematic file separately. Is it possible to combine notifications/tagging? --EugeneZelenko (talk) 13:58, 2 June 2020 (UTC)[reply]

@EugeneZelenko: Done, see Special:Diff/423828594. A few caveats: the grouping only applies within a batch, and the throttle between tags still applies and the warning won't be left until all the tags for that user in this batch have been left. For an example, let's say someone uploads 12 unlicensed files, and I'm running with a batch size of 10. For the first batch, up to 10 of those files will be tagged with one minute between each tag. Once the bot has tagged 10 files, it warns the user about the files it tags and sleeps for the rest of the hour. In the next batch, it will tag the remaining files and warn the user when there are no more files to tag for that user. This means there is necessarily a delay of up to 10 minutes between the first tag for a user and them being warned. I don't think this is a problem at the 10-file batch size, but may be more of an issue with larger batch sizes. --AntiCompositeNumber (talk) 16:55, 4 June 2020 (UTC)[reply]
I think it's reasonable limitation. Test run looks OK for me. --EugeneZelenko (talk) 14:15, 5 June 2020 (UTC)[reply]
  •  Support Looks good to me (I cant see the deleted edits but what I could see looks good) and I think we need a bot to tag files with no license. The sooner the better. --MGA73 (talk) 17:55, 12 June 2020 (UTC)[reply]

Approved. --Krd 10:18, 14 June 2020 (UTC)[reply]