CLI command design

notes

Extract schematic review notes, text frames, and free text into sparse structured JSONC.

Usage

altium-cruncher notes project.PrjPcb
altium-cruncher notes schematic.SchDoc --stdout
altium-cruncher notes project.PrjPcb -o output/notes
altium-cruncher notes project.PrjPcb --include-sheet-template-text

Arguments

file accepts .SchDoc or .PrjPcb. When omitted, the command attempts project auto-detection in the current directory. -o selects the output directory. --stdout writes the payload to standard output instead of a file. --include-sheet-template-text includes title-block and sheet-template owned text that is suppressed by default.

Output

The command writes <input>_notes.jsonc with a top block comment and schema altium_cruncher.notes.a0. Paths are relative to the input directory. Each emitted schematic page contains only its relative file plus non-empty notes, text_frames, and free_text arrays; pages without included annotations are omitted. Entries include text, position in schematic mils, optional bounds, optional Altium unique_id when the source object provides one, and note author when present. Lower-level fields such as source object class, owner index, hidden state, collapsed state, orientation, justification, alignment, entry kind, and page numbering remain available from raw document JSON instead of the review notes artifact. Default output suppresses sheet-template/title-block owned text.

Tests

Unit tests synthesize a SchDoc containing a dedicated note, a text frame, free text, and sheet-template owned text, then verify sparse separated arrays, raw opt-in behavior, JSONC parsing, relative paths, optional unique ids, text, author, mil-position fields, omitted page metadata, and absence of lower-level layout fields.