SQL
AخA
-- 2> /dev/null; date; echo '
/* Missing and wrongly categorized Animated GIF files
* Based on [[User:Dispenser/GIF check]]
*
* License: CC-0
* Runtime: 5 minutes
*/
USE commonswiki_p;
SELECT IF(cl_to IS NULL, "Add", "Remove") AS "Cat",
CONCAT("[[File:", REPLACE(img_name,"_"," "), "]]") AS File
FROM image
JOIN page ON page_namespace=6 AND page_title=img_name
LEFT JOIN categorylinks ON cl_from=page_id AND cl_to IN (
"Animated_GIF_files"
)
WHERE img_major_mime="image" AND img_minor_mime="gif" AND img_media_type="BITMAP"
AND (img_metadata LIKE "%\"frameCount\";i:1;%"
XOR cl_from IS NULL)
GROUP BY img_name;
By running queries you agree to the Cloud Services Terms of Use and you irrevocably agree to release your SQL under CC0 License.
All SQL code is licensed under CC0 License.