Skip to main content

Integrate (add) symbols, footprints and 3D models from a SamacSys Partlib zip archive (as downloaded for instance from Mouser or Farnell) into local KiCad libraries quickly and without additional steps

Project description

parts2kicad

Extracts KiCad symbols, footprints and 3D models from SamacSys partlib zip files as you download them for instance via Mouser or Farnell.

This is done as follows:

flowchart LR

X123.kicad_sym["`X123.kicad_symbol
_KiCad Schematic Symbol_`"]

X123.kicad_mod["`X123.kicad_mod
_KiCad Footprint_`"]

X123.stp["`X123.stp
_3D Model_`"]

symfile["`Gets added to _mylibrary.kicad_sym_`"]
fprintfile["`Gets copied to folder _mylibrary.pretty/X123.kicad_mod_`"]
d3file["`Gets copied to folder _mylibrary.3dshapes/X123.stp_`"]

Zip["Zip Archive"]

Zip --> X123.kicad_sym --> symfile
Zip --> X123.kicad_mod --> fprintfile
Zip --> X123.stp --> d3file

So that you can keep all your downloaded stuff together at one place and do not have to fiddle inside the symbol libraries by yourself. The path to the 3D model in the footprint file is set to a relative path of the form ../mylibrary.3dshapes/X123.stp. Thus, you can move your lib freely around your hard drive. Only if you rename it, the links from footprint to 3D model break.

The script is mainly intended for non Windows users (the official downloading tool only runs on Windows) and those who prefer command line over graphical UI.

Installation

So far via PyPi: pip install parts2kicad.

Usage

Usage is as easy as typing

$ p2k some.zip -t mylibrary.kicad_sym

You can also glob over a bunch of zip archives:

$ p2k ~/downloads/*.zip -t mylibrary.kicad_sym

Screenshots

Example Command Help Message

Project Pages

Technical Background

All in all the main ingredient is a whitespace aware S-Expression parser. It is needed for adding Symbols to the .kicad_sym library files without destroying the format. The format is normally (and also by KiCad specification) nicely indented, so that manual editing is also possible. Footprints and 3D models are luckily managed on file level.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

parts2kicad-0.1.3.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

parts2kicad-0.1.3-py3-none-any.whl (11.4 kB view details)

Uploaded Python 3

File details

Details for the file parts2kicad-0.1.3.tar.gz.

File metadata

  • Download URL: parts2kicad-0.1.3.tar.gz
  • Upload date:
  • Size: 7.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.21 {"installer":{"name":"uv","version":"0.9.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for parts2kicad-0.1.3.tar.gz
Algorithm Hash digest
SHA256 722340256d2f51655bd876ec6c31c68117f9c1d5966cf269b17883588591bf56
MD5 473a41dd76eb830629c3359323483939
BLAKE2b-256 9d9fdf98afcc44f7ad74b02e9ab404dcd9d0d86118a4889148f79b11e3031c7d

See more details on using hashes here.

File details

Details for the file parts2kicad-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: parts2kicad-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 11.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.21 {"installer":{"name":"uv","version":"0.9.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for parts2kicad-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 859f9a1c3a14b2c09aeb2f9c118476cd71d65c7a9c8426e283b105a0719317f1
MD5 f78650e9cac2bee8a1858a94293303ac
BLAKE2b-256 cb1ee79a6d90caa7cabc70a1fd8b6d5a37feb203267b25f69672498ea0893c7e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page