Update 'scripts/setup-generator.py'

pull/4/head
drunkendog 2022-09-26 14:49:33 +01:00
parent 1c395d2982
commit a70e9a583c
1 changed files with 3 additions and 4 deletions

View File

@ -13,12 +13,11 @@ for directory in directories:
with open(f"{directory}/manifest.dat", "r") as f: with open(f"{directory}/manifest.dat", "r") as f:
manifest_info = [line_info.split("\n@ ")[1:] for line_info in f.read().split("%")[1:]] manifest_info = [line_info.split("\n@ ")[1:] for line_info in f.read().split("%")[1:]]
for replacement in manifest_info: for replacement in manifest_info:
print(replacement)
if len(replacement) == 2: if len(replacement) == 2:
replacement.append("-1") replacement.append("-1")
print(replacement[0].rstrip("\n"), replacement[1].rstrip("\n"), int(replacement[2].rstrip("\n")))
current_setup_template.replace(replacement[0].rstrip("\n"), replacement[1].rstrip("\n"), int(replacement[2].rstrip("\n"))) current_setup_template.replace(replacement[0].rstrip("\n"), replacement[1].rstrip("\n"), int(replacement[2].rstrip("\n")))
if glob.glob(f"{directory}/parser.py"): if glob.glob(f"{directory}/parser.py"):