def main(): config = load_config('{}/main.cfg'.format(get_config_dir())) setup_logging(debug=False) input_dir = Path(config.get('unpack', 'data_folder'), 'input') input_file = list(input_dir.iterdir())[0] unpack(input_file, config) return 0
def main(): arguments = setup_argparser('FACT extractor', 'Standalone extraction utility', sys.argv) config = load_config(arguments.config_file) setup_logging(arguments.debug, log_file=arguments.log_file, log_level=arguments.log_level) unpack(arguments.FILE_PATH, config) return 0
def main(args): config = load_config('{}/main.cfg'.format(get_config_dir())) setup_logging(debug=False) input_dir = Path(config.get('unpack', 'data_folder'), 'input') input_file = list(input_dir.iterdir())[0] unpack(input_file, config) if args.chown: output_dir = Path(config.get('unpack', 'data_folder'), 'files') return _change_owner_of_output_files(output_dir, args.chown) return 0
def main(): arguments = setup_argparser('FACT extractor', 'Standalone extraction utility', sys.argv) config = load_config(arguments.config_file) setup_logging(arguments.debug, log_file=arguments.log_file, log_level=arguments.log_level) # Make sure report folder exists some meta.json can be written report_folder = Path(config.get('unpack', 'data_folder'), 'reports') report_folder.mkdir(parents=True, exist_ok=True) unpack(arguments.FILE_PATH, config) return 0