def bmfont2json_parser(description, epilog=None):
    parser = OptionParser(description=description, epilog=epilog,
                          formatter=TitledHelpFormatter())

    parser.add_option("--version", action="store_true", dest="output_version", default=False,
                      help="output version number")
    parser.add_option("-v", "--verbose", action="store_true", dest="verbose", default=False, help="verbose outout")
    parser.add_option("-s", "--silent", action="store_true", dest="silent", default=False, help="silent running")
    parser.add_option("-m", "--metrics", action="store_true", dest="metrics", default=False,
                      help="output asset metrics")
    parser.add_option("--log", action="store", dest="output_log", default=None, help="write log to file")

    group = OptionGroup(parser, "Asset Generation Options")
    group.add_option("-j", "--json_indent", action="store", dest="json_indent", type="int", default=0, metavar="SIZE",
                     help="json output pretty printing indent size, defaults to 0")
    parser.add_option_group(group)

    group = OptionGroup(parser, "Asset Location Options")
    group.add_option("-p", "--prefix", action="store", dest="texture_prefix", default="textures/", metavar="URL",
                     help="texture URL to prefix to all texture references")
    group.add_option("-a", "--assets", action="store", dest="asset_root", default=".", metavar="PATH",
                     help="PATH of the asset root")
    parser.add_option_group(group)

    group = OptionGroup(parser, "File Options")
    group.add_option("-i", "--input", action="store", dest="input", default=None, metavar="FILE",
                     help="source FILE to process")
    group.add_option("-o", "--output", action="store", dest="output", default="default.json", metavar="FILE",
                     help="output FILE to write to")
    parser.add_option_group(group)

    return parser
Standard set of parser options.
dataset/ETHPy150Open turbulenz/turbulenz_tools/turbulenz_tools/tools/bmfont2json.py/bmfont2json_parser