blob: 5b31bcec276b4b1a40fc67aaf58f4b7a252f5527 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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)
|