Skip to content

LEMO Catalogue Spec Assistant

Give OpenCode direct access to LEMO catalogue PDFs, build a structured spec database, and surface specs on the storefront as a product-page spec table driven by Shopify metafields. Status: B Series in progress (K series deferred). Started 2026-07-11.

Concept

The 11 LEMO catalogue PDFs live in /home/dini/vault/catalogues/ and are extracted to searchable text in catalogues/text/. OpenCode reads them directly (replaces manual NotebookLM lookups), and the parsed specs become the source of truth for storefront spec tables and tag generation.

Data pipeline (done)

  • 11 PDFs → catalogues/text/*.txt via pdftotext -layout; index in catalogues/INDEX.md.
  • Verified dataset: catalogues/specs/b_series_multipole.json = 74 unique B-series multipole (shell_size, insert_config) records. Per-size counts match source exactly (0B:7, 1B:10, 2B:15, 3B:16, 4B:11, 5B:13, XB:2).
  • Human reference: catalogues/specs/b_series_multipole.md. Parser: /tmp/opencode/parse_bkt.py (source table = BKT_series.txt lines 4268–4760).
  • Fields per record: series, shell_size, insert_config, contact_count, contact_diameter_mm, terminations (solder/crimp/pcb_straight/pcb_elbow), wire_gauge_awg_range, test_voltage_kv, rated_current_a.

Part-number join key

  • LEMO grammar: MODEL.SIZE+SERIES.INSERTCFG.HOUSING-INSULATOR-CONTACT-COLLET.CABLEØ (e.g. FGG.1B.306.CLAD62). Insert-config last 2 digits = contact count.
  • Store SKU = LEM.<LEMO_PART_NO> (e.g. LEM.ECG1B302CLL). Inserts match LEM.<MODEL><SIZE>B<3-digit-config>...; accessories use 100/200 codes.

Storefront spec table (Dawn theme — local files only, not yet pushed)

  • snippets/spec-table.liquid — renders a styled table from product.metafields.specs.*; only shows when insert_config is set.
  • sections/main-product.liquid — new spec_sheet block (loop case + schema; heading setting).
  • templates/product.lemo-product.jsonspec_sheet block instance after description (this is the template in use).
  • Visual preview: catalogues/specs/spec-preview.html (real 302 data — confirmed OK).

Metafields (live on store)

Namespace specs (additive; separate from the existing custom.* fields). Keys: series, shell_size, insert_config, contact_count, contact_diameter_mm, wire_gauge_awg, rated_current_a, test_voltage_kv, termination_solder, termination_crimp, termination_pcb_straight, termination_pcb_elbow. Written via Shopify MCP update-product (accepts metafields[]). Done for 7 sample 1B products: ECG1B302/304/306/308/316 CLL, EEG1B302CLL, EAG1B316CLN.

Blockers / gotchas

  • Data: store sells LEM.ECG1B310CLL (10-pin 1B) but the catalogue has no 1B.310 (310 is 3B-only). Skipped pending decision.
  • MCP: get-products has no cursor (can't page whole catalog); get-product-by-id doesn't return metafields; update-product does write metafields.
  • Theme deploy: Shopify (2025) blocks themeCreate/themeFilesUpsert for custom-app tokens without exemption → no theme push/create via the shpua_ token. shopify theme dev with a token rejects --store-password despite the password (moyeem) being correct. Real preview needs an interactive shopify theme dev browser login from a local terminal.

Next steps

  • Interactive theme dev login → verify the 7 samples render → bulk-write specs to all B inserts (per-size searchTitle batches via MCP update-product).
  • Resolve 1B.310; then extend the pipeline to K series.

Relationship to Other Tools

  • Drives the spec table on [[JBS LEMO Shopify Storefront]]; can also feed tag generation and the spec-to-tag workflow.
  • Replaces manual NotebookLM spec lookups.