RazrFalcon / svgcleaner

svgcleaner could help you to clean up your SVG files from the unnecessary data.
GNU General Public License v2.0
1.62k stars 93 forks source link

File extension doesn't dictate file contents #195

Closed ghost closed 5 years ago

ghost commented 5 years ago
$ svgcleaner x.svg.txt x-out.svg
Error: Invalid value for '<in-file>': The file format must be SVG.

This error is technically incorrect. The file format is SVG, but the extension is .svg.txt.

Try to confirm whether the file is SVG by detecting an <svg XML element within an XML file, rather than using the filename extension.

RazrFalcon commented 5 years ago

The extension must be svg.

JoKalliauer commented 5 years ago

allowing .svg .xml and *.txt would be great (txt because of github)