Printer enumeration & capabilities (#12) #42

Merged
gronod merged 1 commits from feat/12-printer-enum into milestone/m3-printing 2026-09-09 00:08:57 +01:00
Owner

CUPS enumeration via lpstat -e/-p/-d + lpoptions -p/-l + PPD *Key id/Human: enrichment.

  • Models: Printer, PrinterStatus, PrinterTray, PrinterPaperSize, PrinterMediaType, PrinterCapabilities, PrintOptions, PrintPropertiesResult (docs/10).
  • Pure parsers in CupsParsers — testable on recorded fixtures, no live CUPS.
  • CupsService spawns /usr/bin/lpstat/lpoptions via ProcessManager.runCaptured (injectable binaryDir/ppdDir for tests). Empty destination list = success.
  • detectMediaTypeKey / detectDriverColorBypass tables (docs/11 layer ④).

Tests: CupsParsersTests — 8 Swift Testing suites on real Epson/Canon output.

Closes #12.

Generated with Devin

CUPS enumeration via `lpstat -e`/`-p`/`-d` + `lpoptions -p`/`-l` + PPD `*Key id/Human:` enrichment. - Models: `Printer`, `PrinterStatus`, `PrinterTray`, `PrinterPaperSize`, `PrinterMediaType`, `PrinterCapabilities`, `PrintOptions`, `PrintPropertiesResult` (docs/10). - Pure parsers in `CupsParsers` — testable on recorded fixtures, no live CUPS. - `CupsService` spawns `/usr/bin/lpstat`/`lpoptions` via `ProcessManager.runCaptured` (injectable `binaryDir`/`ppdDir` for tests). Empty destination list = success. - `detectMediaTypeKey` / `detectDriverColorBypass` tables (docs/11 layer ④). Tests: `CupsParsersTests` — 8 Swift Testing suites on real Epson/Canon output. Closes #12. Generated with [Devin](https://devin.ai)
gronod added the Kind/Feature
Priority
Critical
1
Project/ICCery-v2Feature/Backend
labels 2026-09-09 00:08:48 +01:00
gronod added 1 commit 2026-09-09 00:08:49 +01:00
- Printer/PrinterStatus/PrinterTray/PrinterPaperSize/PrinterMediaType/
  PrinterCapabilities/PrintOptions/PrintPropertiesResult models
  (docs/10 shared print types).
- CupsParsers: lpstat -e/-p/-d, lpoptions -p (quoted printer-info),
  lpoptions -l Key/Label listings, PPD *Key id/Human: enrichment with
  locale-qualified key support.
- detectMediaTypeKey (CNIJMediaType > EPIJ_Medi > StpMediaType >
  MediaType) and detectDriverColorBypass (Canon Intent2/Intent, Epson
  CCor/CMat, Gutenprint, generic, EpsonColorMode) — docs/11 layer 4.
- CupsService over ProcessManager.runCaptured with injectable
  binaryDir/ppdDir; empty lpstat output is success.
- ProcessID entries for lpstat/lpoptions/lp.

Core tests: 8 parser suites on recorded Epson/Canon fixtures.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
gronod merged commit 73db1c8c25 into milestone/m3-printing 2026-09-09 00:08:57 +01:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: gronod/iccery-v2-mac#42