mirror of
https://github.com/tcsenpai/Zundler.git
synced 2025-06-04 18:45:27 +00:00
Fix extraction
This commit is contained in:
parent
9994f9da03
commit
8338cb62f7
@ -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,
|
||||
|
@ -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(
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user