Example #1
0
def show(ctx, model_id):
    """
    Retrieves model metadata from the repository.
    """
    import unicodedata

    from kraken import repo
    from kraken.lib.util import make_printable, is_printable

    desc = repo.get_description(model_id)

    chars = []
    combining = []
    for char in sorted(desc['graphemes']):
        if not is_printable(char):
            combining.append(make_printable(char))
        else:
            chars.append(char)
    message(
        'name: {}\n\n{}\n\n{}\nscripts: {}\nalphabet: {} {}\nlicense: {}\nauthor: {} ({})\n{}'
        .format(desc['name'], desc['summary'], desc['description'],
                ' '.join(desc['script']), ''.join(chars), ', '.join(combining),
                desc['license'], desc['author'], desc['author-email'],
                desc['url']))
    ctx.exit(0)
Example #2
0
def show(ctx, model_id):
    """
    Retrieves model metadata from the repository.
    """
    import unicodedata

    from kraken import repo
    from kraken.lib.util import make_printable, is_printable

    desc = repo.get_description(model_id)

    chars = []
    combining = []
    for char in sorted(desc['graphemes']):
        if not is_printable(char):
            combining.append(make_printable(char))
        else:
            chars.append(char)
    message(
        'name: {}\n\n{}\n\n{}\nscripts: {}\nalphabet: {} {}\naccuracy: {:.2f}%\nlicense: {}\nauthor(s): {}\ndate: {}'
        .format(model_id, desc['summary'], desc['description'],
                ' '.join(desc['script']), ''.join(chars), ', '.join(combining),
                desc['accuracy'], desc['license']['id'],
                '; '.join(x['name'] for x in desc['creators']),
                desc['publication_date']))
    ctx.exit(0)
Example #3
0
def show(ctx, model_id):
    """
    Retrieves model metadata from the repository.
    """
    import unicodedata

    from kraken import repo
    from kraken.lib.util import make_printable, is_printable

    desc = repo.get_description(model_id)

    chars = []
    combining = []
    for char in sorted(desc['graphemes']):
        if not is_printable(char):
            combining.append(make_printable(char))
        else:
            chars.append(char)
    message('name: {}\n\n{}\n\n{}\nscripts: {}\nalphabet: {} {}\naccuracy: {:.2f}%\nlicense: {}\nauthor(s): {}\ndate: {}'.format(model_id,
                                                                                                                                 desc['summary'],
                                                                                                                                 desc['description'],
                                                                                                                                 ' '.join(desc['script']),
                                                                                                                                 ''.join(chars),
                                                                                                                                 ', '.join(combining),
                                                                                                                                 desc['accuracy'],
                                                                                                                                 desc['license']['id'],
                                                                                                                                 '; '.join(x['name'] for x in desc['creators']),
                                                                                                                                 desc['publication_date']))
    ctx.exit(0)
Example #4
0
def show(ctx, model_id):
    """
    Retrieves model metadata from the repository.
    """
    desc = repo.get_description(model_id)
    click.echo('name: {}\n\n{}\n\nauthor: {} ({})\n{}'.format(desc['name'],
                                                              desc['summary'],
                                                              desc['author'],
                                                              desc['author-email'],
                                                              desc['url']))
    ctx.exit(0)
Example #5
0
def show(ctx, model_id):
    """
    Retrieves model metadata from the repository.
    """
    desc = repo.get_description(model_id)

    chars = []
    combining = []
    for char in sorted(desc['graphemes']):
        if unicodedata.combining(char):
            combining.append(unicodedata.name(char))
        else:
            chars.append(char)
    click.echo(
        u'name: {}\n\n{}\n\n{}\nalphabet: {} {}\nlicense: {}\nauthor: {} ({})\n{}'
        .format(desc['name'], desc['summary'], desc['description'],
                ''.join(chars), ', '.join(combining), desc['license'],
                desc['author'], desc['author-email'], desc['url']))
    ctx.exit(0)
Example #6
0
def show(ctx, model_id):
    """
    Retrieves model metadata from the repository.
    """
    desc = repo.get_description(model_id)

    chars = []
    combining = []
    for char in sorted(desc['graphemes']):
        if unicodedata.combining(char):
            combining.append(unicodedata.name(char))
        else:
            chars.append(char)
    click.echo(u'name: {}\n\n{}\n\n{}\nalphabet: {} {}\nlicense: {}\nauthor: {} ({})\n{}'.format(desc['name'],
                                                                                              desc['summary'],
                                                                                              desc['description'],
                                                                                              ''.join(chars),
                                                                                              ', '.join(combining),
                                                                                              desc['license'],
                                                                                              desc['author'],
                                                                                              desc['author-email'],
                                                                                              desc['url']))
    ctx.exit(0)