Commit Graph
112 Commits
Author SHA1 Message Date
jessikittyandClaude Opus 5 84049211f5 Warn on the tape page when the server has no scalable font
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vunz4VLxAYDBnU5tLciLDC
2026-10-13 12:04:29 +11:00
jessikittyandClaude Opus 5 e12653db4d Say which font the labels are drawn with
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vunz4VLxAYDBnU5tLciLDC
2026-10-13 12:03:14 +11:00
jessikittyandClaude Opus 5 728754ce52 Show the label font on the settings page
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vunz4VLxAYDBnU5tLciLDC
2026-10-13 12:02:31 +11:00
jessikittyandClaude Opus 5 4c05763a35 Never silently fall back to a 10-pixel font
This is why printed labels were illegible. Pillow uses a built-in bitmap
font when it cannot load a TrueType one, and that font ignores the size it
is asked for - at 300dpi it draws letters under a millimetre tall, which
no Text size setting could fix. python:3.12-slim ships no fonts at all.

load_font now tries LABEL_FONT, a wider list of system paths, a scan of
the font directories, matplotlib's bundled DejaVu, and finally Pillow's
scalable default. font_report() says which one won, so the pages can warn
instead of quietly printing micro-text.

render_fixed also takes a dpi, so the Dymo path draws at 300 rather than
being resampled from 313.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vunz4VLxAYDBnU5tLciLDC
2026-10-13 12:01:19 +11:00
jessikittyandClaude Opus 5 e1c8de9367 Draw at 300dpi and print one bit per dot
Two things were costing sharpness on the Dymo. Labels were rendered at
the tape printer's 313dpi and resampled to 300, softening every letter;
they are now drawn at the target resolution. And the PDF embedded a JPEG,
whose ringing around 2mm text the thermal printer turned to mush - the
pages are now bitonal, which Pillow writes as lossless CCITT G4 at about
3KB a page instead of 45KB.

The new Ink setting decides how the page is reduced: threshold (crisp
text), Floyd-Steinberg (photos) or leave it in colour.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vunz4VLxAYDBnU5tLciLDC
2026-10-13 11:58:39 +11:00
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 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
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 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 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 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