Add project files.
This commit is contained in:
20
gen_group_order.py
Normal file
20
gen_group_order.py
Normal file
@@ -0,0 +1,20 @@
|
||||
with open("group_order.txt", "r") as f:
|
||||
data = f.read()
|
||||
|
||||
types = data.split(", ")
|
||||
|
||||
PREFIX = "RT_"
|
||||
GROUPING = 6
|
||||
out = ""
|
||||
line = []
|
||||
for i, t in enumerate(types):
|
||||
line += [f"{PREFIX}{t}"]
|
||||
if (i + 1) % GROUPING == 0:
|
||||
out += ", ".join(line) + ",\n"
|
||||
line = []
|
||||
|
||||
# leftover
|
||||
if line:
|
||||
out += ", ".join(line) + ",\n"
|
||||
|
||||
print(out)
|
||||
Reference in New Issue
Block a user