summaryrefslogtreecommitdiffstats
path: root/share/symbols/i18n.py
blob: 8fca1c1093c279f7395f6095c8b4fcdaec165aed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/env python3

from xml.dom import minidom
import sys

sys.stdout.write("char * stringlst = [")

for filename in sys.argv[1:]:
    doc = minidom.parse(filename)
    symbols = doc.getElementsByTagName('title')
    
    if symbols:
        for symbol in symbols:
            sys.stdout.write("\n/* Symbols: " + filename + " */  NC_(\"Symbol\", \"" + symbol.firstChild.nodeValue + "\"),")

sys.stdout.write("];")