{% extends "base.html" %} {% import "_icons.html" as icon %} {% block title %}{{ app.name }} · Apps · kopi{% endblock %} {% macro file_card(folder, label, card) %}

{{ label }}

{{ card.total }} item{% if card.total != 1 %}s{% endif %}
{% if card.rows %} {% else %}

Empty

{% endif %}
Show all
{% endmacro %} {% block content %} {% set assigned = key_sources | selectattr("key") | map(attribute="key") | unique | list %}

{{ app.name }}

{{ app.blurb }}

{% if key_sources %} {% if assigned %}Key: {{ assigned | join(", ") }}, saved on Models and keys{% else %}No key chosen{% endif %} {% endif %} {% if app.name in guides %}How it works{% endif %}
{% if settings %}

Settings

{% for field in settings %} {% include "_setting.html" %} {% endfor %}
{% endif %} {% set running = namespace(found=False) %} {% for command in app.commands %}{% if latest[command.name] and latest[command.name].status == "running" %}{% set running.found = True %}{% endif %}{% endfor %}
More: commands
{% for command in app.commands %} {% set job = latest[command.name] %}
{{ command.name }} {{ command.help }} {{ icon.chevron() }}
{% if command.estimate %}{% endif %} {% set entries = command.fields | rejectattr("type", "equalto", "bool") | list %} {% set switches = command.fields | selectattr("type", "equalto", "bool") | list %} {% if entries %}
{% for field in entries %} {% set required = not field.name.startswith("-") and not field.optional %} {% endfor %}
{% endif %} {% for field in switches %} {% endfor %}
{% if job %}{% with run = job, log_url = url_for('console.job_log', job_id=job.id) %}{% include "_run.html" %}{% endwith %}{% endif %}
{% endfor %}

Files

{{ file_card("output", "Results", cards.output) }} {{ file_card("input", "Documents, shared by every tool", cards.input) }}
{% endblock %}