File: svg2png.py

package info (click to toggle)
fofix-dfsg 3.121-2
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 27,016 kB
  • ctags: 4,131
  • sloc: python: 44,002; makefile: 99; perl: 42; sh: 39
file content (8 lines) | stat: -rwxr-xr-x 263 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
#!/usr/bin/python

import os, fnmatch

for root, dirs, files in os.walk("."):
  for svg in fnmatch.filter(files, "*.svg"):
    svg = os.path.join(root, svg)
    print svg, os.system("inkscape -e '%s' -D '%s' -b black -y 0.0" % (svg.replace(".svg", ".png"), svg))