Giter VIP home page Giter VIP logo

kicad-library-utils's Introduction

KiCad utilities

/ directory

check_lib_table.py: Checks the validity of a library table against given libraries

download_pretty_libs.py: Download or update KiCad version 4 footprint libraries

schlib directory

checklib.py: Script for checking KLC compliance of schematic symbol libraries.

schlib.py: A Python module for parsing KiCad's schematic library file format.

test_schlib.sh: A shell script used to validate the generation of files of the schlib module.

fix-pins.py: A script created to help adapt existing library files to the KiCad Library Convention by testing some cases of x/y "wrong" pin positions and trying to fix them. The description of the cases are explained in the header of the script file.

move_part.py: Script to move components between libraries.

autogen/: Scripts for automatically generating schematic symbol libraries.

sch directory

sch.py: A Python module for parsing KiCad's schematic file format.

test_sch.sh: A shell script used to validate the generation of files of the sch module.

add_part_number.py: This script is used to add/edit part number fields in the schematic files.

update_footprints.py: This script updates the footprint fields of .sch files using a .csv file as input.

pcb directory

check_kicad_mod.py: Script for checking KLC compliance of footprint files.

kicad_mod.py: A Python module for loading, editing, and saving KiCad footprint files.

check_3d_coverage.py: Script for checking which KiCad footprints in a .pretty library have 3D models. It also shows unused 3D model files.

How to use

Schematic Library Checker

# first get into schlib directory
cd kicad-library-utils/schlib

# run the script passing the files to be checked
./checklib.py path_to_lib1 path_to_lib2

# to check a specific component you can use the -c flag
./checklib.py -c component_name path_to_lib1

# run the following 'h'elp command to see other options
./checklib.py -h

Adding Part Number (PN) to Schematic Files

# first get into sch directory
cd kicad-library-utils/sch

# use the following command to add empty "MPN" fields in the schematic files
./add_part_number.py path_to_sch1 path_to_sch2

# use the following command to add/edit the PN field using the passed csv file
# the default behaviour is search for "Reference(s)" and "MPN" columns in the csv
# the BOM generated by bom_csv_grouped_by_value plugin can be used after
# manually add the MPN field in the Collated Components section (for example)
./add_part_number.py --bom-csv=path_to_bom_csv path_to_sch_files/*.sch

# run the following 'h'elp command to see other options
./add_part_number.py -h

Footprint Checker

# first get into pcb directory
cd kicad-library-utils/pcb

# run the script passing the files to be checked
./check_kicad_mod.py path_to_fp1.kicad_mod path_to_fp2.kicad_mod

# Add `-v`, `-vv`, or `-vvv` for extra verbose output. The most useful is `-vv`, which explains in details the violations. Ex: 
./check_kicad_mod.py path_to_fp1.kicad_mod path_to_fp2.kicad_mod -vv

# run the following 'h'elp command to see other options
./check_kicad_mod.py -h

3D Coverage Checker

# first get into pcb directory
cd kicad-library-utils/pcb

# run the script to check all footprints
./check_3d_coverage.py

# run the script to check only the specified .pretty folder
./check_3d_coverage.py --prettty Housings_SOIC

# run the following 'h'elp command to see other options
./check_3d_coverage.py -h

Notice

The scripts use a different algorithm to generate files in relation to the KiCad saving action. That will result output files with more modified lines than expected, because the line generally are repositioned. However, the file still functional.

Always check the generated files by opening them on KiCad. Additionally, if you are working over a git repository (if not, you should) you can commit your work before proceed with the scripts, this will put you safe of any trouble. Also, you would use git diff to give a look at the modifications.

kicad-library-utils's People

Contributors

andres53016 avatar antoniovazquezblanco avatar benediktseidl avatar bmv437 avatar carlpoirier avatar cpresser avatar diegoherranz avatar diggit avatar dlharmon avatar drluke avatar efferre79 avatar electricrcaircraftguy avatar evanshultz avatar fat-zer avatar fauxpark avatar gauravjuvekar avatar hvraven avatar jkriege2 avatar mikaelarguedas avatar myfreescalewebpage avatar obko avatar odurc avatar openelectron avatar pcb4u avatar poeschlr avatar pointhi avatar ratfink avatar reportingsjr avatar schrodingersgat avatar seppestas avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.