Commit Graph
25 Commits
Author SHA1 Message Date
jessikittyandClaude Opus 5 a15d5e4d53 Save the default Dymo stock with the other label settings
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vunz4VLxAYDBnU5tLciLDC
2026-10-13 11:04:25 +11:00
jessikittyandClaude Opus 5 3b6cb77388 Add /admin/labels/dymo
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vunz4VLxAYDBnU5tLciLDC
2026-10-13 11:01:05 +11:00
jessikittyandClaude Opus 5 fb59530f0e Send tape jobs paced, and carry the manual grouping through
Print, preview, PDF and the redirect back all honour a groups= spec, so
a hand-built label survives printing instead of reverting to drawers.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vunz4VLxAYDBnU5tLciLDC
2026-10-13 10:28:09 +11:00
jessikitty cfcad5b071 Save a default label size in label settings 2026-10-12 22:44:45 +11:00
jessikitty b5a639c737 Plan the run as physical labels, not one per part
A drawer with two part types is one label, so the page, the preview, the
print loop and the PDF all work from plan_groups rather than iterating
the selection. The preview takes the parts that share a label, and the
page reports how much tape the run will use.
2026-10-12 22:42:49 +11:00
jessikitty 3b48935204 Save a default tape orientation in label settings 2026-10-12 22:12:17 +11:00
jessikitty 9406de237d Keep tape options across the print redirect, honour saved rotation
Printing redirected back to a bare tape page, so every option - rotation
most visibly - reverted to the default the moment you pressed Print.
Carry the chosen options through the redirect instead.

Also read tape_rotate_default so an untick can be made permanent in
Settings; it only applies to a fresh arrival, never over an explicit
choice on the page.
2026-10-12 22:11:09 +11:00
jessikitty 6433f1b172 Persist tape printer settings alongside sheet defaults 2026-10-12 21:31:09 +11:00
jessikitty 92365d3541 Add tape printing blueprint (preview, probe, print, PDF) 2026-10-12 21:27:05 +11:00
jessikitty 41ea7cab3b Add parts catalogue blueprint (browse, update, import, map) 2026-10-12 21:26:32 +11:00
jessikitty 900edea065 Add admin-only parts labels blueprint 2026-10-03 00:55:15 +10:00
jessikitty 48c82ab763 Add page organiser routes; fix bulk upload tuple unpack and harden reorder 2026-10-02 19:55:21 +10:00
jessikitty f7c20de5ac Add owner-only logging and Brickset API call tracking
LIM configured no logging at all, so the instruction fetcher had no trail to follow. Adds a rotating file handler on the root logger plus two owner-only admin pages.

- Admin > Logs: filter by level, source and text; tracebacks kept with their error; auto-refresh, raw download, rotated-file browsing and rotate-now

- Admin > Logs > Brickset API calls: every outbound call recorded with method, params, caller, duration, result count and error, plus daily quota accounting (only getSets counts) and a comparison against getKeyUsageStats

- New owner concept (services/ownership.py): a single account, distinct from is_admin, since these pages expose other admins activity. Defaults to the first admin; flask owner show/set to change

- Services now log through module loggers; retention setting and pruning for call records

- New CLI: flask owner show/set, flask logs path/prune

- New table brickset_api_calls, created automatically at boot; LOG_* env vars, /data/logs in Docker
2026-09-27 10:42:49 +10:00
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 aac2b60517 Implement site settings backend and bulk visibility apply 2026-09-25 00:48:03 +10:00
jessikitty f241e5f6ed Scope set list to visible sets; add visibility and sharing routes 2026-09-25 00:45:45 +10:00
jessikitty 23d6a45584 Gate registration behind the site setting; land on dashboard after login 2026-09-25 00:44:57 +10:00
jessikitty aafdaa5045 Redirect logged-in users to dashboard; scope dashboard stats to visible sets 2026-09-25 00:44:44 +10:00
jessikitty db1d577996 Add GUI archive upload: streams raw body to disk, bypassing the 50MB form cap 2026-09-24 20:29:40 +10:00
jessikitty 03873b37e1 Fix NameError: import current_app (bulk_import logged without it) 2026-09-24 15:48:16 +10:00
jessikitty c6ffe7f153 Add admin backup routes (create/status/download/verify/delete/restore) 2026-09-24 14:31:28 +10:00
jessikitty fdb9211dd2 Change to GLOBAL numbering as default (user_scoped=false) 2025-12-15 00:40:09 +11:00
jessikitty 0a9ae94706 Add MOC blueprint to routes 2025-12-15 00:35:13 +11:00
jessikitty 35d32d1a00 Add MOC API routes for auto-generation and validation 2025-12-15 00:34:48 +11:00
jessikitty 63496b1ccd Initial commit - LEGO Instructions Manager v1.5.0 2025-12-09 17:20:41 +11:00