Commit Graph
8 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 19a2d7ad9e Add idempotent additive schema upgrader 2026-09-25 00:44:00 +10:00
jessikitty 8d5cccc4e3 Add central access guard for set-scoped routes 2026-09-25 00:43:50 +10:00
jessikitty c9ef418cdd Add backup/restore service: full archive of DB + all uploaded files 2026-09-24 14:31:07 +10:00
jessikitty cd0b5f17f5 Add MOC generator with leading zeros support (MOC-0001 format) 2025-12-15 09:23:53 +11:00
jessikitty a72346b68c Add MOCNumberGenerator to services exports 2025-12-15 00:36:07 +11:00
jessikitty 944a679372 Add MOC auto-generation service with sequential numbering 2025-12-15 00:34:34 +11:00
jessikitty 63496b1ccd Initial commit - LEGO Instructions Manager v1.5.0 2025-12-09 17:20:41 +11:00