mirror of
https://github.com/wisplite/crystalline-sky.git
synced 2026-10-30 05:22:18 -05:00
1069db95f9
provide neoforge with a version of custom_mappings.tiny from intermediary->named, instead of official->[intermediary, named]
22 lines
614 B
Python
Executable File
22 lines
614 B
Python
Executable File
#!/bin/python3
|
|
|
|
input_file = "custom_mappings.tiny"
|
|
output_file = "custom_mappings_stripped.tiny"
|
|
|
|
with open(input_file, "r") as f:
|
|
lines = f.readlines()
|
|
|
|
with open(output_file, "w") as f:
|
|
for line in lines:
|
|
stripped = line.rstrip("\n")
|
|
leading_tabs = len(stripped) - len(stripped.lstrip("\t"))
|
|
parts = stripped.lstrip("\t").split("\t")
|
|
|
|
if len(parts) < 2:
|
|
f.write(line)
|
|
continue
|
|
|
|
# remove third-to-last column (i.e. 'official')
|
|
new_parts = parts[:-3] + parts[-2:]
|
|
f.write(("\t" * leading_tabs) + "\t".join(new_parts) + "\n")
|