Feature: Custom target label metadata input & generation in Stage 2 (printtarg -d) (resolves #119) #132

Merged
gronod merged 1 commits from feat/119-printtarg-custom-label into development 2026-08-29 12:26:08 +01:00
Owner

Summary

In Stage 2 (Print Layout), allow users to input target metadata details (printer, ink set, driver paper setting, and actual paper type) to be printed below the color patch targets on the generated TIFF/PostScript pages via printtarg -d.

Changes

  • Stage 2 UI (src/index.html):
    • Added target metadata section with inputs for Printer Model (#targetMetadataPrinter), Ink Set (#targetMetadataInkSet), Driver Paper Setting (#targetMetadataDriverPaper), and Actual Paper Substrate (#targetMetadataActualPaper).
    • Added live preview text field (#targetLabelPreview) with an interactive toggle (#btnToggleLabelEdit) for manual edits or resetting to auto-assembly.
  • Frontend Logic (src/js/printtarg.js):
    • Dynamically concatenates label format: ICCery - <Basename> - <Printer> - <InkSet> - <DriverPaper> - <ActualPaper> - <Timestamp>.
    • Cleanly skips blank fields without redundant separators.
    • Passes custom_label in PrinttargConfig payload to run_printtarg.
    • Verified that profiling presets do not save or load these run-specific metadata fields.
  • Backend IPC (src-tauri/src/commands.rs):
    • Extended PrinttargConfig with custom_label: Option<String>.
    • Updated build_printtarg_args to pass -d "<custom_label>" to printtarg.
    • Added unit test test_build_printtarg_args_with_custom_label.

Resolves #119.

### Summary In **Stage 2 (Print Layout)**, allow users to input target metadata details (printer, ink set, driver paper setting, and actual paper type) to be printed below the color patch targets on the generated TIFF/PostScript pages via `printtarg -d`. ### Changes - **Stage 2 UI (`src/index.html`)**: - Added target metadata section with inputs for Printer Model (`#targetMetadataPrinter`), Ink Set (`#targetMetadataInkSet`), Driver Paper Setting (`#targetMetadataDriverPaper`), and Actual Paper Substrate (`#targetMetadataActualPaper`). - Added live preview text field (`#targetLabelPreview`) with an interactive toggle (`#btnToggleLabelEdit`) for manual edits or resetting to auto-assembly. - **Frontend Logic (`src/js/printtarg.js`)**: - Dynamically concatenates label format: `ICCery - <Basename> - <Printer> - <InkSet> - <DriverPaper> - <ActualPaper> - <Timestamp>`. - Cleanly skips blank fields without redundant separators. - Passes `custom_label` in `PrinttargConfig` payload to `run_printtarg`. - Verified that profiling presets do not save or load these run-specific metadata fields. - **Backend IPC (`src-tauri/src/commands.rs`)**: - Extended `PrinttargConfig` with `custom_label: Option<String>`. - Updated `build_printtarg_args` to pass `-d "<custom_label>"` to `printtarg`. - Added unit test `test_build_printtarg_args_with_custom_label`. Resolves #119.
gronod added 1 commit 2026-08-29 12:24:59 +01:00
gronod merged commit a0de624e77 into development 2026-08-29 12:26:08 +01:00
gronod deleted branch feat/119-printtarg-custom-label 2026-08-29 12:26:08 +01:00
Sign in to join this conversation.