File: fix_eps.py

package info (click to toggle)
solfege 3.16.4-2
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 34,472 kB
  • ctags: 5,287
  • sloc: python: 22,642; xml: 14,196; ansic: 4,682; makefile: 621; sh: 287
file content (16 lines) | stat: -rw-r--r-- 347 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/python2.4

import sys

f = file(sys.argv[1], 'r')
s = f.read()
f.close()
v = s.split("\n")
for x,line in enumerate(v):
    if line.startswith("%%BoundingBox:") or line.startswith("%%HiResBoundingBox:"):
        lv = line.split()
        lv[2] = '0'
        v[x] = " ".join(lv)
f = file(sys.argv[1], 'w')
f.write("\n".join(v))
f.close()