示例#1
0
文件: cli.py 项目: amjobmann/kordesii
def list_(json_):
    """Lists registered decoders."""
    descriptions = kordesii.get_decoder_descriptions()
    if json_:
        print(json.dumps(descriptions, indent=4))
    else:
        print(tabulate.tabulate(descriptions, headers=['NAME', 'SOURCE', 'AUTHOR', 'DESCRIPTION']))
示例#2
0
def _print_decoders(json_output=False):
    """Prints out list of registered decoders."""
    descriptions = kordesii.get_decoder_descriptions()
    if json_output:
        print(json.dumps(descriptions, indent=4))
    else:
        print(
            tabulate.tabulate(
                descriptions,
                headers=['NAME', 'SOURCE', 'AUTHOR', 'DESCRIPTION']))