Exemple #1
0
def run_from_command_line_args(args):
    run_config = None

    try:
        run_config = ImportConfig.fromargs(args)
    
    except Exception as e:
        print('Error while processing command line arguments: ' + str(e))
        print('Quitting...')
        sys.exit(1)
        
    run_import(run_config)
Exemple #2
0
def run_from_config_file(args):
    run_config = None

    try:
        import_config = load_config_json(args.FILE[0])
        run_config = ImportConfig.fromdict(import_config, file_process_fn=TypedTSV.fromdict)

    except Exception as e:
        print('Error while reading import configuration JSON: ' + str(e))
        print('Quitting...')
        sys.exit(1)
        
    run_import(run_config)