Last change
on this file since 3 was
3,
checked in by valtob, 15 years ago
|
subversion source 1.6.2 as test
|
-
Property svn:executable set to
*
|
File size:
510 bytes
|
Line | |
---|
1 | #!/usr/bin/env python |
---|
2 | # |
---|
3 | # strip-po-charset.py |
---|
4 | # |
---|
5 | |
---|
6 | import sys |
---|
7 | |
---|
8 | def strip_po_charset(inp, out): |
---|
9 | |
---|
10 | out.write(inp.read().replace("\"Content-Type: text/plain; charset=UTF-8\\n\"\n","")) |
---|
11 | |
---|
12 | def main(): |
---|
13 | |
---|
14 | if len(sys.argv) != 3: |
---|
15 | print("Usage: %s <input (po) file> <output (spo) file>" % sys.argv[0]) |
---|
16 | print("") |
---|
17 | print("Unsupported number of arguments; 2 required.") |
---|
18 | sys.exit(1) |
---|
19 | |
---|
20 | strip_po_charset(open(sys.argv[1],'r'), open(sys.argv[2],'w')) |
---|
21 | |
---|
22 | if __name__ == '__main__': |
---|
23 | main() |
---|
Note: See
TracBrowser
for help on using the repository browser.