Skip to main content
The browseable catalog is pre-built offline by Python scripts (locally or in CI) and committed as JSON. Nothing in this pipeline runs at request time — the web app only reads the finished index.
Run these scripts from the repo root with Python 3.12+. They clone upstream libraries into temp dirs, parse them, and write the index files under data/.

Sources

Each indexed record carries a source field (trace | cern); on id collisions, Trace wins de-dupe.

scripts/sync.py — idempotent controller

Tracks the last-synced commit hash per source in data/.sync_state.json and only re-clones/re-indexes a source whose upstream HEAD changed.
On the footprints repo, sync persists each source’s raw .pretty libraries into data/trace-footprints/ and data/cern-footprints/ (both gitignored) and rebuilds the combined footprints_index.json from both on every run, so neither source overwrites the other.

Indexers

build_index.py (symbols)

Parses every .kicad_sym via balanced-paren extraction, resolves extends inheritance, classifies categories, and writes data/symbols_index.json (compact) plus per-library data/libraries/{Name}.json (full pin data).

build_footprints.py (footprints)

Accepts multiple --data-dir args (infers source from the dir name), recursively scans .pretty dirs, parses .kicad_mod (+ legacy .module) for pad count/types/tags/ 3D model, de-dupes by id, and writes data/footprints_index.json.
scripts/import_cern.py shallow-clones the CERN repo and copies the relevant libraries (.kicad_symdata/cern-symbols/ on the symbols repo; .pretty dirs → data/cern-footprints/ on the footprints repo), writing a manifest.json.

Index shapes

The compact symbols_index.json omits pin arrays; full pin data lives in per-library files loaded on demand. Footprints carry their pad array inline in the index.

CI

.github/workflows/sync-libraries.yml runs the sync on a daily cron (and manual dispatch), and if the index changed, opens a PR (peter-evans/create-pull-request). The symbols workflow is labeled symbols; the footprints workflow is labeled footprints.