Closed AbdealiLoKo closed 8 years ago
Agree, not related, but answering anyway ... The algo I used was a quick and dirty copy from http://stackoverflow.com/questions/15136264/how-can-i-say-a-file-is-svg-without-using-a-magic-number which worked for the files I tested on commons. It was only intended to check if a file was SVG or not.
At that time I did not like py_w3c because the latest version was 0.1.2 which was created in 2014 but it seems 0.2.0 was released just 15 days ago - which re-affirms my faith in the library :) PS: Python3 is still not supported in py_w3c 0.2.0 :(
15 days ago... I feeled it... ;)
They mention py3.4 support but I could not find a travis yet.
From looking at
is_svg()
in https://github.com/pywikibot-catfiles/file-metadata/blob/master/file_metadata/mixins.py#L98 I do not understand how you figure out invalid SVGs (according to W3C). That would be useful to categorize by filling templates like https://commons.wikimedia.org/wiki/Category:SVG_created_with_..._templatesBut this is not related to this issue.