mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-11 15:58:36 +00:00
Change from obr to tob dir, added a status doc
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
def patch_template(template_path, opcodes_path, output_path):
|
||||
try:
|
||||
with open(opcodes_path, 'r') as f:
|
||||
opcodes = [line.strip() for line in f if line.strip()]
|
||||
|
||||
with open(template_path, 'r') as f:
|
||||
content = f.read()
|
||||
|
||||
for index, value in enumerate(opcodes):
|
||||
placeholder = f"{{{{{index}}}}}"
|
||||
content = content.replace(placeholder, value)
|
||||
|
||||
with open(output_path, 'w') as f:
|
||||
f.write(content)
|
||||
|
||||
print(f"Successfully transformed: {output_path}")
|
||||
|
||||
except FileNotFoundError as e:
|
||||
print(f"Error: File Not Found - {e}")
|
||||
except Exception as e:
|
||||
print(f"Error: Exception - {e}")
|
||||
|
||||
if __name__ == "__main__":
|
||||
patch_template(
|
||||
template_path='opcode.template',
|
||||
opcodes_path='opcodes.csv',
|
||||
output_path='patch_TOB.conf'
|
||||
)
|
||||
Reference in New Issue
Block a user