import argparse import os import sys import unpacker from error import Ai1wmError ''' obtain new info for sites database install core files move wp-content to correct place import db to website check for any issues ''' if __name__ == '__main__': """ Entry of the ai1wm program. """ parser = argparse.ArgumentParser(prog='ai1wm', description='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)