diff options
Diffstat (limited to 'web/images/coso.py')
-rw-r--r-- | web/images/coso.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/web/images/coso.py b/web/images/coso.py new file mode 100644 index 0000000..5b31bce --- /dev/null +++ b/web/images/coso.py @@ -0,0 +1,16 @@ +import os, sys + +if len(sys.argv) <= 1: + raise SystemExit(__doc__) + +for input in sys.argv[1:]: + if not input.endswith('.svg'): + print 'skipping "%s": it is not an svg file' % input + continue + + output = input.replace('.svg', '.png') + # Convert using inkscape + if os.system('inkscape --export-png="%s" --file="%s"' % (output, input)) != 0: + print 'inkscape png conversion fails' + sys.exit(1) + |