{% extends "base.html" %} {% block title %}Alberich: teach a layout{% endblock %} {% block body %}

← File details and actions

Teach Alberich a layout

{{ st.original_name }}. Pick what kind of account it is, check the preview against your own statement, then save. Next time this layout is recognised on sight.

Where does this belong?

{% if spec %}{% endif %} {% if acct %}

Read as a {{ type_names[atype] }}, because that is what the account is.

{% else %}

It decides which way charges count. For a card, purchases are money out. A card read as a bank account shows every purchase as income.

{% endif %}

Use this if the preview shows purchases as money in, or deposits as money out.

{% if not accounts %}

Add your accounts first

{% endif %}
{% for n in notes %}
{{ n }}
{% endfor %} {% if flip_helps %}
Flipping the direction makes the totals add up. Tick "Flip money in and money out" above and the preview should balance.
{% endif %} {% if pv and pv.error %}
{{ pv.error }}
{% elif pv %}

Preview: {{ pv.count }} lines

{{ 'Balances' if pv.verdict == 'ok' else 'Cannot be checked' if pv.verdict == 'unverifiable' else 'Does not add up' }}

{{ pv.n_out }} line{{ 's' if pv.n_out != 1 }} read as money out and {{ pv.n_in }} as money in.{% if atype in ('credit_card', 'line_of_credit') and pv.n_out == 0 %} A card statement should have purchases as money out. Check the account type above.{% endif %}

{{ pv.note }}{% if pv.period[0] %} Period {{ pv.period[0] }} to {{ pv.period[1] }}.{% endif %}

{% for t in pv.rows %}{% if pv.gap and loop.index == 10 %}{% endif %} {% endfor %}
DateDescriptionAmount
…
{{ t.date }}{{ t.desc }}{{ money(-t.out_cents) if t.out_cents < 0 else money(t.out_cents) }}{% if t.out_cents < 0 %} in{% endif %}

Compare a few rows with your statement. If money out and money in are swapped, or dates are off, edit the layout below.

{% endif %} {% if spec %}
Fine-tune the layout (advanced)
{% else %}

Alberich could not draft a layout

That happens with scanned PDFs or unusual designs. {% if excerpt is not none %}The Warlock can sometimes help, below.{% endif %}

{% endif %} {% if excerpt is not none %}
{% if flip %}{% endif %}

Ask the Warlock for a better layout

{% 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 the text below would be sent, to Anthropic, whose model the Warlock speaks through. Every digit has been replaced by 9 and the wording of each transaction by x's, so no amounts, dates, names or account numbers leave this machine. Used this month: {{ '%.1f' % llm.spent_cents }}¢ of {{ llm.cap_cents }}¢.

{{ excerpt }}
{% endif %}
{% endif %} {% endblock %}