Commit Graph
6 Commits
Author SHA1 Message Date
jessikitty 89f65e2d74 Add automatic instruction fetcher for official sets
Downloads official instruction PDFs from LEGO, located via the Brickset API, one set per interval (10 minutes by default) so neither API gets hammered. Official sets only; MOCs are excluded throughout.

- New admin page at /admin/instruction-fetch: queue builder, pacing controls, live countdown and per-set job history

- Database-backed queue (instruction_fetch_jobs) and last-run timestamp, so pacing survives restarts

- Background worker thread, plus 'flask instructions queue/run/status' for Task Scheduler or cron

- SHA-256 dedupe (instructions.sha256), PDF header check, size cap and streaming downloads via temp files

- brickset_api: getInstructions2 by set number and getInstructions by setID (the old code sent a set number to the setID method); getSets params now proper JSON; getKeyUsageStats added

- Schema top-ups applied automatically at boot: new table plus instructions.sha256/source

- Docker: fetcher env vars passed through compose, no worker thread in the entrypoint bootstrap
2026-09-26 13:43:17 +10:00
jessikitty 70d3ad8f96 Wire schema upgrade, access guard and registration flag into the app factory 2026-09-25 00:47:01 +10:00
jessikitty 6821b67941 Serve uploads from UPLOAD_FOLDER so it can live on a mounted volume 2026-09-24 19:48:29 +10:00
jessikitty a974ec5fa3 Register backup blueprint, CLI commands and current_year context var 2026-09-24 14:34:07 +10:00
jessikitty 4de5127b24 Register MOC blueprint in Flask app 2025-12-15 00:35:37 +11:00
jessikitty 63496b1ccd Initial commit - LEGO Instructions Manager v1.5.0 2025-12-09 17:20:41 +11:00