{% extends "base.html" %} {% block title %}Alberich: sort the Other pile{% endblock %} {% block body %}

← The Review

Sort The Other Pile

These merchants are still filed under Other. Alberich already guesses from the names he knows. The Warlock can sort the rest, and you can change any answer before it is applied.

{% if request.query_params.get('moved') is not none and request.query_params.get('merchants') %}
Moved {{ request.query_params.get('moved') }} purchase{{ 's' if request.query_params.get('moved') != '1' }} from {{ request.query_params.get('merchants') }} merchant{{ 's' if request.query_params.get('merchants') != '1' }}.
{% endif %} {% if pending %}

Sort by hand

Pick a category, or type a new one, for as many merchants as you like, then press Move once. Rows you leave alone stay where they are. Every purchase still under Other moves, and later purchases follow.

{% for p in pending %}
{{ p.label }}{{ p.n }} purchase{{ 's' if p.n != 1 }}, {{ money(p.total) }}
{% endfor %}
{% endif %} {% if job and job.status == 'running' %}

Alberich is sorting

The Warlock is reading the merchant names. This usually takes under a minute, and you can leave this page.

{% elif job and job.status == 'failed' %}
Nothing was sorted this time. {{ job.error }}
{% elif job %}

The Warlock's sorting

{% for r in rows %}{% endfor %}
MerchantBuysCategory
{{ r.name }}{% if r.why %}
{{ r.why }}{% endif %}
{{ r.n }}

Ticked rows set that merchant's category from now on, and re-file its purchases that were under Other. Lines you already moved elsewhere are left alone.

{% endif %} {% if not job or job.status == 'failed' %} {% if not pending %}
Nothing is filed under Other. Well sorted.
{% else %}

What will be sent

{% if not llm.key_present %}

No Anthropic key is configured, so this is switched off.

{% elif llm.killed %}

The Warlock is switched off.

{% else %}

Only these {{ pending|length }} merchant names go to Anthropic, whose model the Warlock speaks through: (as they appear on your statements, with store numbers removed) and how many purchases each. No amounts, dates, accounts or descriptions beyond the name. Used this month: {{ '%.1f' % llm.spent_cents }}¢ of {{ llm.cap_cents }}¢.

{% for p in pending %}{{ p.label }}  ({{ p.n }}){{ "\n" }}{% endfor %}
{% endif %}
{% endif %} {% endif %} {% endblock %}