mirror of
https://github.com/ryanamay/pint.git
synced 2024-09-20 01:50:34 +00:00
Restyled by black
This commit is contained in:
parent
9d3eb1dc9b
commit
3aa1b86ca6
2 changed files with 30 additions and 12 deletions
|
@ -1,7 +1,7 @@
|
||||||
with open('schemeGroups.js', 'a') as f:
|
with open("schemeGroups.js", "a") as f:
|
||||||
x = open('colors.txt', 'r')
|
x = open("colors.txt", "r")
|
||||||
prev_line = ''
|
prev_line = ""
|
||||||
prevComparison = ''
|
prevComparison = ""
|
||||||
groupNumber = 0
|
groupNumber = 0
|
||||||
|
|
||||||
for current_line in x:
|
for current_line in x:
|
||||||
|
@ -11,11 +11,29 @@ with open('schemeGroups.js', 'a') as f:
|
||||||
if prevComparison != value[0:7]:
|
if prevComparison != value[0:7]:
|
||||||
groupNumber += 1
|
groupNumber += 1
|
||||||
alphaValue = 0
|
alphaValue = 0
|
||||||
f.write(']\n\n// color group: ' + str(groupNumber) + ' | default color: ' +
|
f.write(
|
||||||
value + '\nexport var cg' + str(groupNumber) + '_' + varName + ' = [\n')
|
"]\n\n// color group: "
|
||||||
|
+ str(groupNumber)
|
||||||
|
+ " | default color: "
|
||||||
|
+ value
|
||||||
|
+ "\nexport var cg"
|
||||||
|
+ str(groupNumber)
|
||||||
|
+ "_"
|
||||||
|
+ varName
|
||||||
|
+ " = [\n"
|
||||||
|
)
|
||||||
else:
|
else:
|
||||||
f.write(']\n\n// color group: ' + str(groupNumber) + ' | default color: ' +
|
f.write(
|
||||||
value + '\nexport var cg' + str(groupNumber) + 'a_' + value[7:9] + ' = [\n')
|
"]\n\n// color group: "
|
||||||
|
+ str(groupNumber)
|
||||||
|
+ " | default color: "
|
||||||
|
+ value
|
||||||
|
+ "\nexport var cg"
|
||||||
|
+ str(groupNumber)
|
||||||
|
+ "a_"
|
||||||
|
+ value[7:9]
|
||||||
|
+ " = [\n"
|
||||||
|
)
|
||||||
f.write('"' + current_line.split("=>")[1].strip() + '",\n')
|
f.write('"' + current_line.split("=>")[1].strip() + '",\n')
|
||||||
prev_line = current_line
|
prev_line = current_line
|
||||||
prevComparison = value[0:7]
|
prevComparison = value[0:7]
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
with open('formatted.txt', 'a') as f:
|
with open("formatted.txt", "a") as f:
|
||||||
x = open('colors.txt', 'r')
|
x = open("colors.txt", "r")
|
||||||
prev_line = ''
|
prev_line = ""
|
||||||
|
|
||||||
for current_line in x:
|
for current_line in x:
|
||||||
if prev_line.split("=>")[0].strip() != current_line.split("=>")[0].strip():
|
if prev_line.split("=>")[0].strip() != current_line.split("=>")[0].strip():
|
||||||
f.write('\n')
|
f.write("\n")
|
||||||
f.write(current_line)
|
f.write(current_line)
|
||||||
prev_line = current_line
|
prev_line = current_line
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue