2006-08-19 14:27:56 +02:00
|
|
|
#!/usr/bin/python
|
|
|
|
|
|
|
|
import sys
|
|
|
|
|
2006-09-08 13:53:55 +02:00
|
|
|
result = 'table = {\n'
|
2006-08-19 14:27:56 +02:00
|
|
|
result += '\'white\' : \'black\' , \\\n'
|
|
|
|
|
|
|
|
hex_file = open(sys.argv[1], 'r')
|
|
|
|
|
|
|
|
for line in hex_file.readlines():
|
|
|
|
[ stroke, fill ] = line.split()
|
|
|
|
result += '\'#%s\' : \'#%s\', \\\n' % (fill, stroke)
|
|
|
|
|
|
|
|
result += '}'
|
|
|
|
|
|
|
|
hex_file.close()
|
|
|
|
|
|
|
|
print result
|
|
|
|
|