File: parse-metadata.py

package info (click to toggle)
frogatto-data 1.3.1%2Bdfsg-4
  • links: PTS, VCS
  • area: non-free
  • in suites: forky, sid, trixie
  • size: 254,428 kB
  • sloc: xml: 584; python: 396; perl: 249; sh: 126; ruby: 69; makefile: 21
file content (11 lines) | stat: -rwxr-xr-x 455 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/env python
# -*- coding: utf-8 -*-
files=["../MAC_APP_STORE_METADATA", "../iOS_APP_STORE_METADATA", "../CHANGELOG", "../iOS_CHANGELOG"]
files=[(x, open(x, "r").readlines()) for x in files]
for f in files:
	f = [f[0],[[x+1,f[1][x]] for x in range(len(f[1]))]]
	for line in f[1]:
		if line[1].strip():
			print('#: ' + f[0] + ':' + str(line[0]))
			print('msgid "' + line[1].strip(' * ').strip().replace('"','\\"') + '"')
			print('msgstr ""\n')