Self-contained KiCad library (symbols, footprints, 3D models, docs,
import/check tooling) with no dependency on kicad-personal-library.
- Fixed sym-lib-table/fp-lib-table: single (version 7) header, one entry
per library, MIKILAB_<name> nicknames, ${KIPRJMOD}-relative URIs
- Resolved the SOT95P280X145-5N footprint collision (TPS7A2012PDBVR vs
TPS7A2018PDBVR): confirmed byte-identical modulo KiCad's internal
tedit timestamp, unified into one shared footprint
- Resolved a case-insensitive filename collision between the official
Diode.kicad_sym and a custom diode.kicad_sym
- Wrapped standalone footprints (ESP32-S31-WROOM-3, IC_TPS63020DSJT,
SOT95P280X145-5N) into their own .pretty libraries so they're
actually registered in fp-lib-table
- Fixed broken symbol->footprint references (including one pointing at
a nonexistent easyeda2kicad library)
- Added scripts/check_library.py, import_component.py, add_component.py,
import_batch.py, and lib_common.py
37 lines
925 B
Python
37 lines
925 B
Python
#!/usr/bin/env python3
|
|
"""
|
|
add_component.py
|
|
=================
|
|
|
|
The simple, one-command way to add a component to the MIKILAB library.
|
|
|
|
python3 scripts/add_component.py \\
|
|
--name TPS7A2018PDBVR \\
|
|
--symbol /path/to/TPS7A2018PDBVR.kicad_sym \\
|
|
--footprint /path/to/SOT95P280X145-5N.kicad_mod \\
|
|
--model /path/to/TPS7A2018PDBVR.step \\
|
|
--category power
|
|
|
|
This does not reimplement anything: it is a thin, friendlier front-end
|
|
over import_component.py's core logic (same validation, same collision
|
|
handling, same lib-table regeneration). Use import_component.py directly
|
|
if you want the more explicit/verbose interface.
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
import sys
|
|
from pathlib import Path
|
|
|
|
sys.path.insert(0, str(Path(__file__).resolve().parent))
|
|
|
|
import import_component
|
|
|
|
|
|
def main() -> int:
|
|
return import_component.main()
|
|
|
|
|
|
if __name__ == "__main__":
|
|
sys.exit(main())
|