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)
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)
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)