Fix extraction

This commit is contained in:
Adrian Vollmer 2024-04-29 09:35:11 +02:00
parent 9994f9da03
commit 8338cb62f7
3 changed files with 5 additions and 6 deletions

View File

@ -5,7 +5,7 @@ def main():
from .embed import embed_assets, extract_assets
if args.revert:
if args.extract:
extract_assets(
args.input_path,
output_path=args.output_path,

View File

@ -30,12 +30,11 @@ parser.add_argument(
)
parser.add_argument(
"-R",
"--revert",
"-x",
"--extract",
default=False,
action="store_true",
help="set this flag for the reverse operation: deflate a Zundler file"
' into its components (ouput_path must be a directory; "." by default)',
help='extract files from a Zundler file (ouput_path must be a directory; "." by default)',
)
parser.add_argument(

View File

@ -324,7 +324,7 @@ def extract_assets(input_path, output_path=None):
blob = base64.b64decode(blob)
blob = zlib.decompress(blob).decode()
blob = json.loads(blob)
file_tree = blob["file_tree"]
file_tree = blob["fileTree"]
except Exception as e:
logger.error(str(e))
logger.error("Does not look like a Zundler output file: %s" % input_path)