Skip to main content

lcsc2kicad

Surcouche de easyeda2kicad : importe des composants LCSC/EasyEDA (symbole + empreinte + modèle 3D) dans la librairie KiCad du projet, avec le numéro LCSC conservé dans un champ du symbole.

Installation

pipx install lcsc2kicad        # ou : pip install lcsc2kicad

Utilisation

lcsc2kicad C12345                      # import complet dans le projet courant
lcsc2kicad C12345 --no-3d              # sans modèle 3D
lcsc2kicad C123 C456 --project ~/kicad/DesktopHub
lcsc2kicad --from-file refs.txt -y     # sans confirmation
lcsc2kicad list                        # composants de la librairie (format relisible, voir ci-dessous)
lcsc2kicad list > refs.txt             # sauvegarde façon « pip freeze »
lcsc2kicad remove C12345               # supprime symbole (+ empreinte/3D devenus inutiles)
lcsc2kicad init                        # facultatif : crée dossiers + .lcsc2kicad.toml

lcsc2kicad config list                 # réglages effectifs et leur origine (défaut/global/projet)
lcsc2kicad config set no_3d true       # modifie .lcsc2kicad.toml du projet
lcsc2kicad config set --global projects_root ~/kicad   # config globale (-g)
lcsc2kicad config get lcsc_field | unset no_3d | path

Choix du projet (ordre) : --project → sélecteur (si activé) → remontée depuis le dossier courant. Le projet retenu est affiché et confirmé avant toute écriture (-y pour désactiver ; un choix fait dans le sélecteur vaut confirmation).

Chaque import affiche le nom du composant (nom du symbole) à côté de la référence LCSC. La référence est aussi ajoutée aux mots-clés du symbole (ki_keywords) : taper C25804 dans le sélecteur de symboles de KiCad retrouve le composant (désactivable : lcsc_keyword = false).

Librairie créée dans libs/<projet>.kicad_sym, libs/<projet>.pretty/, libs/3dmodels/. À faire une seule fois dans KiCad : Préférences > Gérer les librairies (onglet du projet), avec le même nom pour les symboles et les empreintes.

Exporter / réimporter une liste

list n'écrit que la liste sur la sortie standard (infos de contexte sur la sortie d'erreur) :

#LCSC      Symbole            Empreinte
C163512    #1206L050YR        DesktopHub:F1206
C5355001   #126RV0014         DesktopHub:CAP-SMD_BD10.0-L10.3-W10.3-LS11.3-FD

Tout ce qui suit un # est ignoré par --from-file : seul le numéro LCSC est relu. lcsc2kicad list > refs.txt puis, dans un autre projet, lcsc2kicad --from-file refs.txt -y. Sous Windows PowerShell 5.1, > écrit en UTF-16 : utiliser list | Out-File -Encoding utf8 refs.txt.

Configuration (TOML)

Projet : <projet>/.lcsc2kicad.toml — global : ~/.config/lcsc2kicad/config.toml (%APPDATA%\lcsc2kicad\config.toml sous Windows). Priorité : flags > projet > global > défauts.

# global uniquement
projects_root = "~/kicad"
use_selector  = true

# global ou projet
lib_dir = "libs"
lib_name = "MaLib"         # défaut : nom du projet
model_dir = "3dmodels"     # relatif à lib_dir
lcsc_field = "LCSC"
lcsc_keyword = true       # réf LCSC dans les mots-clés de recherche
no_3d = false

Développement

pip install -e ".[dev]" && pytest

Metadata

Release files for lcsc2kicad 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lcsc2kicad 0.1.1
File Size Uploaded Provenance Actions
lcsc2kicad-0.1.1.tar.gz 21.2 kB Without provenance Details for lcsc2kicad-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for lcsc2kicad 0.1.1
File Interpreter ABI Platform Actions
lcsc2kicad-0.1.1-py3-none-any.whl Python 3 none any Details for lcsc2kicad-0.1.1-py3-none-any.whl

Total release size: 40.3 kB

Release files / lcsc2kicad-0.1.1.tar.gz

Download URL lcsc2kicad-0.1.1.tar.gz
Size 21.2 kB
Tags Source
SHA-256 checksum
How to use checksums
a51ef7d1a9838bfd9383552028a622b9f833df1a3ea428912a0f6d626b74f9a1
BLAKE2b-256 checksum
How to use checksums
d8a534aee6690523aaebf7109e7d0d5fee510829ec19b41245ff47ed668fe12f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.8

Release files / lcsc2kicad-0.1.1-py3-none-any.whl

Download URL lcsc2kicad-0.1.1-py3-none-any.whl
Size 19.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ea06b02b2ee6f337a06212293db88eca89f1c23ddc3b91face9bf950c1b8dd97
BLAKE2b-256 checksum
How to use checksums
e769b1161e44631d54b7ca602328ddcd55ce6c76f7b82a7ab794c1ed2d498dad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.8

Security for lcsc2kicad 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page