def list(ctx): """ Lists repositories in the repository. """ model_list = repo.get_listing(partial(spin, 'Retrieving model list')) click.secho(u'\b\u2713', fg='green', nl=False) click.echo('\033[?25h\n', nl=False) for m in model_list: click.echo('{} ({}) - {}'.format(m, model_list[m]['type'], model_list[m]['summary'])) ctx.exit(0)
def list(ctx): """ Lists models in the repository. """ model_list = repo.get_listing(partial(spin, 'Retrieving model list')) click.secho(u'\b\u2713', fg='green', nl=False) click.echo('\033[?25h\n', nl=False) for m in model_list: click.echo('{} ({}) - {}'.format(m, model_list[m]['type'], model_list[m]['summary'])) ctx.exit(0)
def list_models(ctx): """ Lists models in the repository. """ from kraken import repo message('Retrieving model list ', nl=False) model_list = repo.get_listing(partial(message, '.', nl=False)) message('\b\u2713', fg='green', nl=False) message('\033[?25h\n', nl=False) for id, metadata in model_list.items(): message('{} ({}) - {}'.format(id, ', '.join(metadata['type']), metadata['summary'])) ctx.exit(0)
def list_models(ctx): """ Lists models in the repository. """ from kraken import repo with KrakenProgressBar() as progress: download_task = progress.add_task( 'Retrieving model list', total=0, visible=True if not ctx.meta['verbose'] else False) model_list = repo.get_listing(lambda total, advance: progress.update( download_task, total=total, advance=advance)) for id, metadata in model_list.items(): message('{} ({}) - {}'.format(id, ', '.join(metadata['type']), metadata['summary'])) ctx.exit(0)