Commit Graph
100 Commits
Author SHA1 Message Date
jessikittyandClaude Opus 5 4132e1031b Carry the ink choice and the font status into the Dymo page
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vunz4VLxAYDBnU5tLciLDC
2026-10-13 11:55:31 +11:00
jessikittyandClaude Opus 5 b42f27514a Tell the tape page which font the labels will use
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vunz4VLxAYDBnU5tLciLDC
2026-10-13 11:55:01 +11:00
jessikittyandClaude Opus 5 08284b7d7b Install a font in the image
python:3.12-slim ships no font files, so Pillow fell back to its 10-pixel
bitmap font and every printed label came out with sub-millimetre text.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vunz4VLxAYDBnU5tLciLDC
2026-10-13 11:54:04 +11:00
jessikitty c8ce4d8117 revert 74f128a01d
revert labeltest
2026-10-13 11:53:00 +11:00
jessikitty 74f128a01d labeltest 2026-10-13 11:36:13 +11:00
jessikittyandClaude Opus 5 b2fca605a0 Document the Dymo output and the real limits of text size
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vunz4VLxAYDBnU5tLciLDC
2026-10-13 11:06:57 +11:00
jessikittyandClaude Opus 5 0337814b4d Stop the text size dial promising what 40mm cannot deliver
Measured it: on a 40mm label most names already span the width by about
1.4x, and everything above that did nothing at all. Cap the control at 2x
with Normal / Large / Largest, and say plainly what the limit is.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vunz4VLxAYDBnU5tLciLDC
2026-10-13 11:05:51 +11:00
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 51e9478065 Dymo entry points: bulk button, per-row icon, whole category
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vunz4VLxAYDBnU5tLciLDC
2026-10-13 11:03:17 +11:00
jessikittyandClaude Opus 5 7ff633be09 Remember which Dymo stock is usually loaded
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vunz4VLxAYDBnU5tLciLDC
2026-10-13 11:02:31 +11:00
jessikittyandClaude Opus 5 5d118eb286 The Dymo page: stock, grid, cut guides and a sheet preview
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vunz4VLxAYDBnU5tLciLDC
2026-10-13 11:01:51 +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 7e74ee56ed Gang drawer labels onto Dymo die-cut stock
Stock presets, column packing, 300dpi rendering and a PDF whose page size
is exactly the sticker size. Labels are drawn by tape_printer.render_fixed
so they match the tape-printed ones.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vunz4VLxAYDBnU5tLciLDC
2026-10-13 11:00:34 +11:00
jessikittyandClaude Opus 5 6a5a6eafff Register the Dymo blueprint
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vunz4VLxAYDBnU5tLciLDC
2026-10-13 10:59:34 +11:00
jessikittyandClaude Opus 5 085fe1d701 Tape page: combine/split buttons, text size slider, print guard
Tick labels under the preview to put them on one label; the grouping is
rebuilt from the whole plan, not just the twelve previewed. Text size
gains a slider and Normal/Large/Huge/Max presets. The print button
disables itself after a click so a double-click can't spend the tape
twice.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vunz4VLxAYDBnU5tLciLDC
2026-10-13 10:31:25 +11:00
jessikittyandClaude Opus 5 fbfd66d889 Hand-built label groups, and text that grows when you ask it to
parse_group_spec / spec_from_groups let the page combine any parts onto
one label, and plan_groups never breaks a hand-made group up.

Text size now goes to 3x and means it: the name is sized first, the
image shrinks out of its way, and the floor no longer rises with the
setting - which is what truncated long names at large sizes. The meta
line takes the leftover room instead of pushing itself off the label.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vunz4VLxAYDBnU5tLciLDC
2026-10-13 10:30:10 +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
jessikittyandClaude Opus 5 deb009b80e Treat "busy" as retryable and pace jobs behind the printer
The VC-500W accepts one job at a time; anything sent while the tape is
moving comes back server-error-busy. Add IPPBusy, wait_until_idle and
print_job_paced so a batch goes through instead of failing from the
second label on.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vunz4VLxAYDBnU5tLciLDC
2026-10-13 10:27:14 +11:00
jessikittyandClaude Opus 5 041eb60485 Document job pacing, manual label combining and text size
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vunz4VLxAYDBnU5tLciLDC
2026-10-13 10:26:06 +11:00
jessikitty d2c330a4bc Add the default label size setting 2026-10-12 22:45:18 +11:00
jessikitty cfcad5b071 Save a default label size in label settings 2026-10-12 22:44:45 +11:00
jessikitty b4bc31556b Label size controls, per-label preview with its mm size 2026-10-12 22:43:39 +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 d86a71de67 Fixed 40 x 15mm drawer labels, 40 x 20mm for a shared drawer
Drawer labels are now a set physical size rather than however long the
text happens to be:

  one part type in the drawer    40 x 15 mm
  two part types                 40 x 20 mm

They lie across the tape, so the 40mm spans the width and each label only
costs its height in tape length - 1.5m per 100 standard labels instead of
4m. That needs 50mm tape, which is now the default; a narrower tape is
detected and warned about rather than silently clipping.

Two part types in one drawer are matched on the location field and
combined onto a single taller label. Nothing is ever dropped: in
"always 40 x 15" a shared drawer simply yields two labels, and a third
part type grows the label by 5mm rather than vanishing.

Part names are wrapped to two lines and the type auto-sized to fit, so
"Plate, Modified with Clip" prints in full instead of truncating.

"Fit the tape width" keeps the previous content-sized behaviour.
2026-10-12 22:42:01 +11:00
jessikitty ba11a52909 Add a default tape orientation setting 2026-10-12 22:14:01 +11:00
jessikitty 432bd5b219 Send the options marker from the sheet print form 2026-10-12 22:13:34 +11:00
jessikitty 4f26360cf2 Send the options marker, warn on an empty label 2026-10-12 22:12:55 +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 5319870a7c Fix: unticking every sheet field silently reset to the defaults
Same absent-checkbox bug as the tape page, caught alongside it. The
hidden form marker lets an empty field list be honoured as a real
choice instead of being treated as "nothing was submitted".
2026-10-12 22:09:41 +11:00
jessikitty 4a1bfc4acd Fix: unticking "Rotate for tape feed" had no effect
An unticked checkbox is absent from a form submission entirely, so
"rotate unticked" and "rotate never mentioned" arrived at the parser
looking identical - and rotate defaults to on, so it snapped straight
back every time. Add a hidden marker the options form always sends, so
absent-but-submitted can be read as unticked.

Same bug silently reset the field list when every field was unticked;
that is fixed by the same marker. rotate_default lets a saved site-wide
preference apply on a fresh arrival without overriding an explicit
untick on the page.
2026-10-12 22:08:51 +11:00
jessikitty bad4787e00 Document the catalogue sync, tape printing and the skin 2026-10-12 21:33:41 +11:00
jessikitty b8571697dd Apply catalogue skin to the label form 2026-10-12 21:33:06 +11:00
jessikitty dea750927c Apply catalogue skin to the categories page 2026-10-12 21:32:42 +11:00
jessikitty 86b3f5a481 Add tape printer settings panel and catalogue skin 2026-10-12 21:32:14 +11:00
jessikitty 70443028e3 Reskin label list and add tape printing entry points 2026-10-12 21:31:49 +11:00
jessikitty 6433f1b172 Persist tape printer settings alongside sheet defaults 2026-10-12 21:31:09 +11:00
jessikitty f86efd875d Create parts catalogue tables at boot 2026-10-12 21:30:13 +11:00
jessikitty d455647a18 Register catalogue and tape blueprints and models 2026-10-12 21:29:57 +11:00
jessikitty f8c53e91ad Add parts catalogue migration script 2026-10-12 21:29:32 +11:00
jessikitty 60f83fc002 Add tape printing page with live preview and printer probe 2026-10-12 21:29:20 +11:00
jessikitty b1c071ff88 Add catalogue browse page with the Update button 2026-10-12 21:28:45 +11:00
jessikitty ee8806c2a6 Add shared catalogue header and tab strip 2026-10-12 21:27:57 +11:00
jessikitty dc4b9c90fb Add dense catalogue skin for the labelling pages 2026-10-12 21:27:47 +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 7d32ad8fd6 Add 313dpi continuous-tape rendering for the VC-500W 2026-10-12 21:26:02 +11:00
jessikitty 832ab97d08 Add minimal IPP client for AirPrint label printers 2026-10-12 21:25:12 +11:00
jessikitty f6f1f4e2bc Add the Update button: Rebrickable CSV dump sync 2026-10-12 21:24:28 +11:00
jessikitty 63c3ece271 Add local Rebrickable catalogue mirror models 2026-10-12 21:23:54 +11:00
jessikitty 9d7fb66c6a Document the parts labelling feature 2026-10-03 00:59:20 +10:00
jessikitty 8fa0e7e4ef Add Parts Labels to the admin menu 2026-10-03 00:58:58 +10:00
jessikitty dcafe2b408 Create part label tables at boot 2026-10-03 00:58:15 +10:00
jessikitty 1046318caf Register parts labels blueprint, models and uploads/parts folder 2026-10-03 00:57:58 +10:00
jessikitty 88fdfe0169 Add printable label sheet template 2026-10-03 00:57:26 +10:00
jessikitty e36331e2d6 Add label settings page 2026-10-03 00:56:52 +10:00
jessikitty a4c760beac Add category management page 2026-10-03 00:56:37 +10:00
jessikitty a7ba8e511e Add label create/edit form 2026-10-03 00:56:17 +10:00
jessikitty 527f354f4a Add parts labels browse page 2026-10-03 00:55:54 +10:00
jessikitty 900edea065 Add admin-only parts labels blueprint 2026-10-03 00:55:15 +10:00
jessikitty b0614a11f7 Add label sheet geometry, layout engine and optional PDF export 2026-10-03 00:54:25 +10:00
jessikitty 2cedb68d6d Add part catalogue service (taxonomy seeding, Rebrickable lookup) 2026-10-03 00:53:39 +10:00
jessikitty a93edd7930 Add seed part taxonomy 2026-10-03 00:53:11 +10:00
jessikitty 3a29df60d9 Add PartCategory and PartLabel models 2026-10-03 00:52:45 +10:00
jessikitty ca5d3eb1c9 Add parts label migration script 2026-10-03 00:52:16 +10:00
jessikitty 480dd4993b Add Organise pages button to the edit set page 2026-10-02 23:52:33 +10:00
jessikitty f6a3b760fa Register the flask pages CLI group 2026-10-02 19:56:37 +10:00
jessikitty 95425986d8 Add flask pages CLI group for auditing and fixing page order 2026-10-02 19:56:13 +10:00
jessikitty 42956cff97 Register instructions.organise as an owner-only editing surface 2026-10-02 19:55:38 +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 2e2f2d66d6 Add drag-and-drop page organiser template 2026-10-02 19:54:34 +10:00
jessikitty 9e0fc343f7 Add page_order service for ordering image instruction pages 2026-10-02 19:53:38 +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 70d3ad8f96 Wire schema upgrade, access guard and registration flag into the app factory 2026-09-25 00:47:01 +10:00
jessikitty 25401c229c Add AUTO_SCHEMA_UPGRADE toggle 2026-09-25 00:46:43 +10:00
jessikitty a82c77b0ef Build out the Site Settings page: signup, visibility defaults, navigation, bulk apply 2026-09-25 00:46:23 +10:00
jessikitty 6d20037cdf Hide the register prompt when signups are closed 2026-09-25 00:45:57 +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 dcd205fc6a Export SetShare and SiteSetting 2026-09-25 00:44:31 +10:00
jessikitty eb796b6884 Add visibility column, access helpers and visible_to query to Set 2026-09-25 00:44:26 +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 af714e7b9d Add SetShare model for per-user set sharing 2026-09-25 00:43:33 +10:00
jessikitty f03b3bfdaf Add SiteSetting model for admin-configurable settings 2026-09-25 00:43:26 +10:00
jessikitty ac38227dac Add drag-and-drop archive upload with progress to the backup page 2026-09-24 20:31:21 +10:00
jessikitty f60339a60f Add BACKUP_MAX_UPLOAD (0 = no limit) 2026-09-24 20:29:58 +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 842ef065e1 Add Docker deployment runbook 2026-09-24 19:49:48 +10:00
jessikitty 8a9966f7b0 Add compose env template 2026-09-24 19:49:23 +10:00
jessikitty 077eba9950 Add .dockerignore - keep local data and venv out of the image 2026-09-24 19:49:17 +10:00
jessikitty 889f611cd5 Add container requirements (psycopg3 + gunicorn) 2026-09-24 19:49:12 +10:00
jessikitty 686ec17c43 Add compose stack: app + Postgres 16, named volumes 2026-09-24 19:49:04 +10:00
jessikitty b5aa982794 Add container entrypoint: wait for DB, create schema, drop privileges 2026-09-24 19:48:53 +10:00
jessikitty 333c5143cf Add Dockerfile (python 3.12-slim, gunicorn, non-root) 2026-09-24 19:48:38 +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 04c5eddd17 Make UPLOAD_FOLDER env-configurable; resolve relative paths from project root 2026-09-24 19:48:09 +10:00