Commons:Bots/Requests/Crystal-bot 2

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

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

Bot's tasks for which permission is being sought: Tag {{BadGIF}} to GIF files with only one frame

Automatic or manually assisted: Unsupervised automatic

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

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

Programming language(s): Pywikibot, src

identify path/to/file.gif | wc -l would return frame count. Coding... Stang 22:20, 9 June 2022 (UTC)[reply]

Discussion
Did a few trial edits. This task use n_frames attribute provided by Pillow to calculate frame counts, which consumes a large sum of memories. Stang 23:41, 10 June 2022 (UTC)[reply]
Somehow bot marked only 1×1 files. It'll be more reasonable to nominated unused ones for deletion. --EugeneZelenko (talk) 14:07, 11 June 2022 (UTC)[reply]
List were generated with ascending order of size (as larger GIF file has smaller possibility to have only one frame), so it start with 1x1 file. I could skip those 1x1 files if needed. Filled a deletion request of a small amount of them. Stang 15:50, 11 June 2022 (UTC)[reply]
  • What is the reason to tag such files? If GIF files are really discouraged, they should be converted to a new format, replaced within articles and perhaps be redirected to the original name for external users. Just tagging them doesn't appear to me to make much sense. --Krd 18:07, 11 June 2022 (UTC)[reply]
    • I'm kind of worrying about losing the edit/upload history of original (GIF) file if performing a direct replacement; also, not pretty sure is the converting from GIF to PNG/JPEG using something like ImageMagick would work as what we expected is a better source instead of something like recompression. Also there's a technical limitation: it's hard for program to "think" is a specific file a photographic-like image (better for JPEG format) or a symbol-like image (PNG). Stang 06:52, 13 June 2022 (UTC)[reply]

Approved. --Krd 09:05, 19 June 2022 (UTC)[reply]