7 from migrator import Migrator
9 parser = argparse.ArgumentParser(description='Process some integers.')
10 parser.add_argument('SOURCE_DIR', type=str, help='source directory')
11 parser.add_argument('DEST_DIR', type=str, help='target directory')
12 parser.add_argument('-c', '--cleanup', action='store_true', dest='cleanup',
13 default=False, help='clean-up source dir')
14 parser.add_argument('-v', '--verbose', action='store_true', dest='verbose',
15 default=False, help='enable verbose output')
16 parser.add_argument('-q', '--quiet', action='store_true', dest='quiet',
17 default=False, help='suppress non-error output')
19 args = parser.parse_args()
22 log_level = logging.INFO
24 log_level = logging.ERROR
26 log_level = logging.WARNING
28 logging.basicConfig(format='[%(asctime)s] %(levelname)s: %(message)s',
29 level=log_level, datefmt='%m/%d/%Y %H:%M:%S')
31 migrator = Migrator(args.SOURCE_DIR, args.DEST_DIR)
32 migrator.migrate(args.cleanup)