print final output name

This commit is contained in:
Fabian Dill 2021-07-25 16:15:51 +02:00
parent 5c21538553
commit 1b4762715c
1 changed files with 3 additions and 2 deletions

View File

@ -515,8 +515,9 @@ def main(args, seed=None):
create_playthrough(world)
if args.create_spoiler: # needs spoiler.hashes to be filled, that depend on rom_futures being done
world.spoiler.to_file(os.path.join(temp_dir, '%s_Spoiler.txt' % outfilebase))
logger.info('Creating final archive.')
with zipfile.ZipFile(output_path(f"AP_{world.seed_name}.zip"), mode="w", compression=zipfile.ZIP_DEFLATED,
zipfilename = output_path(f"AP_{world.seed_name}.zip")
logger.info(f'Creating final archive at {zipfilename}.')
with zipfile.ZipFile(zipfilename, mode="w", compression=zipfile.ZIP_DEFLATED,
compresslevel=9) as zf:
for file in os.scandir(temp_dir):
zf.write(os.path.join(temp_dir, file), arcname=file.name)