mirror of
https://github.com/SMGCommunity/Petari.git
synced 2024-11-23 05:29:50 +00:00
13 lines
480 B
Python
13 lines
480 B
Python
def convert_entry(entry):
|
|
obj_name = entry.split("[")[1].split(".o")[0]
|
|
new_path = f"Game/Util/{obj_name}.cpp"
|
|
return f'Object(NonMatching, "{new_path}"),'
|
|
|
|
def process_file(input_filename, output_filename):
|
|
with open(input_filename, 'r') as infile, open(output_filename, 'w') as outfile:
|
|
for line in infile:
|
|
converted_line = convert_entry(line.strip())
|
|
outfile.write(converted_line + '\n')
|
|
|
|
process_file('input.txt', 'output.txt')
|