def init_args():
    parser = argparse.ArgumentParser(
        description='Generate Mantle models by a given JSON file.'
    )
    parser.add_argument('json_file',
                        help='the JSON file to be parsed')
    parser.add_argument('output_dir',
                        help='output directory for generated Objective-C files')
    parser.add_argument('--prefix',
                        help='class prefix of Objective-C files')
    parser.add_argument('--author',
                        help='author info')
    args = parser.parse_args()

    if not os.path.exists(args.output_dir):
        try:
            os.mkdir(args.output_dir)
        except __HOLE__:
            print('Error: could not create directory {}'.format(
                args.output_dir
            ))
            exit()

    return args
dataset/ETHPy150Open sutar/JSON2Mantle/JSON2Mantle/cli.py/init_args