2024-03-03 23:17:49 -06:00

29 lines
719 B
Python

import argparse
import os
import sys
import unpacker
from error import Ai1wmError
'''
check file for proper format
extract info file
gather details
extract files to new folder with permissions
'''
if __name__ == '__main__':
""" Entry of the ai1wm program. """
parser = argparse.ArgumentParser(prog='ai1wm', description='Pack/Unpack All-in-One WP Migration Packages')
parser.add_argument('source', help='source path')
parser.add_argument('target', help='target path')
args = parser.parse_args()
try:
if os.path.isfile(args.source):
unpacker.Ai1wmUnpacker().unpack(args.source, args.target)
except Ai1wmError as e:
print(e)
sys.exit(-1)
sys.exit(0)