mirror of
https://github.com/tcsenpai/Zundler.git
synced 2025-06-06 11:35:40 +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
|
from .embed import embed_assets, extract_assets
|
||||||
|
|
||||||
if args.revert:
|
if args.extract:
|
||||||
extract_assets(
|
extract_assets(
|
||||||
args.input_path,
|
args.input_path,
|
||||||
output_path=args.output_path,
|
output_path=args.output_path,
|
||||||
|
@ -30,12 +30,11 @@ parser.add_argument(
|
|||||||
)
|
)
|
||||||
|
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"-R",
|
"-x",
|
||||||
"--revert",
|
"--extract",
|
||||||
default=False,
|
default=False,
|
||||||
action="store_true",
|
action="store_true",
|
||||||
help="set this flag for the reverse operation: deflate a Zundler file"
|
help='extract files from a Zundler file (ouput_path must be a directory; "." by default)',
|
||||||
' into its components (ouput_path must be a directory; "." by default)',
|
|
||||||
)
|
)
|
||||||
|
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
|
@ -324,7 +324,7 @@ def extract_assets(input_path, output_path=None):
|
|||||||
blob = base64.b64decode(blob)
|
blob = base64.b64decode(blob)
|
||||||
blob = zlib.decompress(blob).decode()
|
blob = zlib.decompress(blob).decode()
|
||||||
blob = json.loads(blob)
|
blob = json.loads(blob)
|
||||||
file_tree = blob["file_tree"]
|
file_tree = blob["fileTree"]
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error(str(e))
|
logger.error(str(e))
|
||||||
logger.error("Does not look like a Zundler output file: %s" % input_path)
|
logger.error("Does not look like a Zundler output file: %s" % input_path)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user