Kicad-library-generator

I am not sure is this right place to ask but…

Looks it is not any manual, and looks this script is maybe “it what I am searching”.

I can run python in Windows: I expand this tool to folder (“C:\sandbox”). Then I go to this folder with Command line (cmd) and run this script. Somethn happened, script make somethin: It open any window to 0,1 second. But it make nothing.

Maybe this is bigger question also: how to run this type scripts? Can I run this type scripts alone? Or is it any special way “it must be run inside Kicad”… ?

It’s not a plugin (so I’ve reclassified the thread). The usage instructions are in the README on the Github page. It seems to be a command line tool. For more questions you’d have to ask the author via Github, as it’s a project not connected with the KiCad project. It’s labelled as work in progress and doesn’t seem to have been touched for 2 years.

This script is heavily work in progress! It can be used only for experimental purposes.

I’d say a little more than just a work in progress.

What are you attempting @elkesan ?

And it looks like it has not been updated for two years, which means it’s from before KiCad V6.

What is your intention for want to run a script like that? KiCad V7 is going to get some database functonality, maybe that is a usable (or better?) alternative for you.

Ok, this clarify.

I try make much components “manually”. I compare this with PADS: It is easy way modify symbol and footprints in Ascii-form.

Eg. I want make a set of resistors and capacitors. Now we must go to philosophical side. It is several way make projects. Eg. capacitor. One man take Generic Capacitor, put it to schematic, and edit footprint, value, etc etc etc inside schematic. Then this man copy this capacitor and modify it data. Second way is make own symbol for every different capacitor: so, from my symbol library found cap_cer_smd_100n-50V-X7R-1%-0603, cap_cer_smd_10n-100V-X7R-1%-0603, etc etc etc. I love this way reason I make it work one time, and then I found it from library. Without errors.

So, this “kicad-library-generator” make just this work: I can make a large quantity components this way.

Second way is open kicad_sym in text editor:

(kicad_symbol_lib (version 20211014) (generator kicad_symbol_editor)
  (symbol "CAP_SMD_CER_15pF-50V-5%-COG0603" (pin_names (offset 1.016)) (in_bom yes) (on_board yes)
    (property "Reference" "C2" (id 0) (at -2.54 6.096 90)
etc etc etc

Copy&paste all this, and edit manually all texts. But. If I make this way, it is really same work I open symbol in symbol editor, edit data, SAVE AS. Edit, SAVE AS new name etc.

So, this is reason why this type tool “kicad-library-generator” is good. But, I try contact editor…

That is what the database driven libraries are all about.

1 Like

Ok, found solution.

  1. Take any “base component”. Capacitors, resistors are easy.
  2. Put component to Spreasheet, eg. excel.
  3. Use Excel- semi-automation. Pick up, chain, etc. Eg. use chain for “Capacitor” + “Ceramic” + + etc.
  4. After work all components are in own columns: A1:A62 first capacitor, B2:B62 next etc etc.
  5. Now make new tab in Excel, first colum are numbers 1-62 ("=if(A1=62;1;A1+1 etc) and next column base number. So first column is component lines, next help put back right order.
  6. Make formula using chaining “=A1:A62” etc. So first line is A1:A62, next B etc. Using Excel formula tools now all these are text, not formulas.
  7. Order 1-62-column ascending order, so now first column is “1, 1…”. Paste formulas.
  8. Now put all lines to right order using second column.
  9. Use “filter” and show only “1”. Now you can edit formulas: text is eg. =A1:A62, but it is not formula. Edit it and enter- and now Excel fill automatically all lines.
  10. Filter and show all.
  11. Now you can copy all components using clipboard to text editor.

So… this hear complex, but if you are familiar with Excel, it is not. Of course this type work is million times easier with Python script… but, python need you must study it first…