[r13118]: branches / using_qt_opengl / scripts / fix-rgd-headers.py Maximize Restore History

Download this file

fix-rgd-headers.py    23 lines (19 with data), 1.2 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/python
#
# From: "Anders Dahnielson" <anders@dahnielson.com>
#
# PURPOSE: rewrite .rgd files with header that is more universally recognized as
# belonging to us
#
import sys, gzip
inf = open(sys.argv[1], 'r')
zipf = gzip.GzipFile(mode='r', fileobj=inf)
content = zipf.read()
zipf.close()
inf.close()
outf = open(sys.argv[1], 'w')
zipf = gzip.GzipFile(mode='w', filename='audio/x-rosegarden-device', fileobj=outf)
zipf.filename = "audio/x-rosegarden-device"
zipf.write(content)
zipf.close()
outf.close()