{# Instruction fetcher control panel. Created by: Jess Rogerson (yelling commands at Claude.AI) #} {% extends "base.html" %} {% block title %}Instruction Fetcher - Admin{% endblock %} {% block content %}

Instruction Fetcher

Downloads official building instructions from LEGO, using Brickset to find them. Official sets only — one set every {{ summary.interval_minutes }} minutes so nobody's API gets upset.

Back
{% if not summary.brickset_configured %}
Brickset API not configured. Add BRICKSET_API_KEY, BRICKSET_USERNAME and BRICKSET_PASSWORD to your .env and restart.
{% endif %} {% if not worker_running %}
The background worker thread isn't running in this process. Queued sets will only move when you press Run one now, or when flask instructions run is called from Task Scheduler.
{% endif %}
Status
{% if summary.enabled %} Running {% else %} Paused {% endif %}
Next fetch in
—
In the queue
{{ summary.counts.queued }}
Official sets without a PDF
{{ summary.sets_missing_pdfs }}
Build the queue

{{ summary.official_sets }} official set(s) in the library, {{ summary.sets_missing_pdfs }} with no PDF instructions yet.

Limit
Newest sets first. Skips anything already queued.

Pacing
Turn off to pause. The queue is kept either way.
10 is a polite default (144 sets a day). The clock is stored in the database, so a restart doesn't reset it.
Big sets have several books; this spaces those downloads out.
This is the only call that counts against the Brickset daily quota. The ID is saved to the set afterwards.
Recent jobs
{% for job in jobs %} {% else %} {% endfor %}
Set Status Files Tries Result
{% if job.lego_set %} {{ job.lego_set.set_number }}
{{ job.lego_set.set_name }}
{% else %} deleted set {% endif %}
{{ job.status }} {{ job.files_added }} {{ job.attempts }} {{ job.message or '—' }} {% if job.is_open %}
{% else %}
{% endif %}
Nothing queued yet.
{% endblock %}