blob: ab14e7ec14065abb1eb45b5c2bd7c19c7812226c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#!/usr/bin/env python
""" Simple unicode map with comments strip for Scribus
It converts original file taken from:
http://www.unicode.org/Public/5.0.0/ucd/NamesList.txt
into simple hex:comment values map used in UnicodeSearch
class
Petr Vanek <petr@scribus.info>
"""
print 'start stripping'
f = open('NamesList.txt', 'r')
out = {}
for i in f:
if i[:1] == '@' or i[:1] == '\t':
continue
str = i.split('\t')
out[str[0]] = ' '.join(str[1:]).strip()
f.close()
print 'writing output'
f = open('unicodenameslist.txt', 'w')
for i in out:
f.write("%s:%s\n" % (i, out[i]))
f.close()
print 'done'
|