{% extends "base.html" %} {% block title %}{{ app.name }} ยท 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 and search
{% endmacro %} {% block content %}

{{ app.name }}

{{ app.blurb }}

{% if key_sources %} {% set assigned = key_sources | selectattr("key") | map(attribute="key") | unique | list %}
{% if assigned %}Key: {{ assigned | join(", ") }}{% else %}Key: the app's own file{% endif %}
{% endif %}
{% if settings %}

Settings

{% for field in settings %} {% include "_setting.html" %} {% endfor %}
{% endif %}

Commands

{% for command in app.commands %} {% set job = latest[command.name] %}
{{ command.name }} {{ command.help }}
{% 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 %}