def main():
    args = parser.parse_args()
    in_path = Path(args.src)
    out_path = Path(args.dst)
    debug = args.debug
    path = args.extra_rules
    if (not path):
        path = (PROJ_ROOT / 'dicomanonymizer/resources/extra_rules.json')
    extra_rules = get_extra_rules(use_extra=(not args.no_extra), extra_json_path=path)
    fix_exposure()
    msg = f'''
    Start a job: {args.type}, debug set to {args.debug}
    Will anonymize data at: {in_path} and save to {out_path}
    '''
    logger.info(msg)
    if (args.type == 'batch'):
        anonymize_root_folder(in_path, out_path, debug=debug, extra_anonymization_rules=extra_rules)
    elif (args.type == 'folder'):
        anonymize_dicom_folder(in_path, out_path, debug=debug, extra_anonymization_rules=extra_rules)
    logger.info('Well done!')
def main():
    args = parser.parse_args()
    in_path = Path(args.src)
    out_path = Path(args.dst)
    debug = args.debug
    path = args.extra_rules
    if (not path):
        path = (PROJ_ROOT / 'dicomanonymizer/resources/extra_rules.json')
    extra_rules = get_extra_rules(use_extra=(not args.no_extra), extra_json_path=path)
    fix_exposure()
    msg = f'
    Start a job: {args.type}, debug set to {args.debug}
    Will anonymize data at: {in_path} and save to {out_path}
    '
    logger.info(msg)
    if (args.type == 'batch'):
        anonymize_root_folder(in_path, out_path, debug=debug, extra_anonymization_rules=extra_rules)
    elif (args.type == 'folder'):
        anonymize_dicom_folder(in_path, out_path, debug=debug, extra_anonymization_rules=extra_rules)
    logger.info('Well done!')