def opt_parser():
parser = ArgumentParser(prog='fontmerger', formatter_class=ArgumentDefaultsHelpFormatter)
parser.add_argument('base_fonts', metavar='BASE_FONT', nargs='*', default=[],
help='target fonts')
parser.add_argument('-V', '--version', dest='show_version', action='store_true', default=False,
help='show version')
parser.add_argument('-v', '--verbose', dest='verbose', action='store_true', default=False,
help='verbose mode')
parser.add_argument('-c', '--config', dest='config', default='./fonts.json',
help='a configuration file which define font merge context by JSON format')
parser.add_argument('-x', '--ext-fonts', dest='ext_fonts', metavar='EXT_FONT_ID', nargs='*', default=[],
help='a list of font identifier that merging fonts')
parser.add_argument('-i', '--info', dest='info', action='store_true', default=False,
help='show base font information')
parser.add_argument('-o', '--output', dest='outputdir', metavar='OUTPUT_DIR', default='./',
help='output directory')
parser.add_argument('-l', '--list', dest='list_fonts', action='store_true', default=False,
help='show available additional fonts')
parser.add_argument('-p', '--preview', dest='preview_fonts', action='store_true', default=False,
help='preview fonts')
parser.add_argument('--all', dest='all', action='store_true', default=False,
help='extend all fonts')
parser.add_argument('--suffix', dest='suffix', help='font name suffix')
parser.add_argument('--debug', dest='debug', action='store_true', default=False, help='debug mode')
return parser
评论列表
文章目录