feat(target): add -u flag to printtarg for structured JSON target manifest #10

Merged
gronod merged 1 commits from feature/printtarg-json-manifest into main 2026-08-21 21:51:57 +01:00
Owner

Summary of Changes

Adds the -u command-line switch to target/printtarg to output a structured JSON manifest upon target creation completion to stdout (fixes #3).

Key Features:

  • Emits a structured JSON manifest detailing exact generated filenames (.tif, .eps, .ps), physical page dimensions (width_mm, height_mm), and patch counts per page.
  • Accurately counts test patches and Target ID patches while excluding layout padding patches (T_PAD).
  • Preserves 100% backward compatibility when -u is omitted.
  • Fully documented in doc/printtarg.html.

Example Output:

{
  "event": "manifest",
  "pages": [
    {"filename": "target_01.tif", "patches": 80, "width_mm": 101.6, "height_mm": 152.4},
    {"filename": "target_02.tif", "patches": 20, "width_mm": 101.6, "height_mm": 152.4}
  ]
}
### Summary of Changes Adds the `-u` command-line switch to `target/printtarg` to output a structured JSON manifest upon target creation completion to `stdout` (fixes #3). #### Key Features: - Emits a structured JSON manifest detailing exact generated filenames (`.tif`, `.eps`, `.ps`), physical page dimensions (`width_mm`, `height_mm`), and patch counts per page. - Accurately counts test patches and Target ID patches while excluding layout padding patches (`T_PAD`). - Preserves 100% backward compatibility when `-u` is omitted. - Fully documented in `doc/printtarg.html`. #### Example Output: ```json { "event": "manifest", "pages": [ {"filename": "target_01.tif", "patches": 80, "width_mm": 101.6, "height_mm": 152.4}, {"filename": "target_02.tif", "patches": 20, "width_mm": 101.6, "height_mm": 152.4} ] } ```
gronod added 1 commit 2026-08-21 18:55:28 +01:00
- Implement -u command-line switch to output structured JSON manifest upon target generation completion
- Track per-page output filenames, physical page dimensions (width_mm and height_mm), and patch counts
- Accurately count test patches and TID patches while excluding T_PAD padding patches
- Document -u switch in doc/printtarg.html
gronod merged commit c1267eecca into main 2026-08-21 21:51:57 +01:00
gronod deleted branch feature/printtarg-json-manifest 2026-08-22 09:29:58 +01:00
Sign in to join this conversation.