2007-01-20 13:38:58 +01:00
|
|
|
#!/usr/bin/env python
|
2006-08-19 14:27:56 +02:00
|
|
|
|
|
|
|
import sys
|
|
|
|
|
2006-09-08 15:09:10 +02:00
|
|
|
result = 'colors = [\n'
|
2006-08-19 14:27:56 +02:00
|
|
|
|
|
|
|
hex_file = open(sys.argv[1], 'r')
|
|
|
|
|
|
|
|
for line in hex_file.readlines():
|
|
|
|
[ stroke, fill ] = line.split()
|
2006-09-08 15:09:10 +02:00
|
|
|
result += '[\'#%s\', \'#%s\'], \\\n' % (fill, stroke)
|
2006-08-19 14:27:56 +02:00
|
|
|
|
2006-09-08 15:09:10 +02:00
|
|
|
result += ']'
|
2006-08-19 14:27:56 +02:00
|
|
|
|
|
|
|
hex_file.close()
|
|
|
|
|
|
|
|
print result
|
|
|
|
|