Novinka:GitHub: KiCad to CSV symbol library exporter
(Kategória: Software-ZONE)
Zaslal EdizonTN
04.06.2024-08:05

Na githube som objavil zaujímavý python script pre KiCad
Z knižnice symbolov dokáže exportovať parametre do formátu .csv a to aj s užívateľom definovanými.
Pre kontrolu knižníc ako stvorené.

Pochopiteľne, neobjavil som ho náhodne. Dopomohol mi miestny člen Andy99, ktorý ho vytvoril a zavesil na GitHub.
Ďakujem!

Ako teda pracuje?
Script prebehne zadanú knižnicu, alebo každú knižnicu symbolov v zadanom adresári a vyextrahuje z nich všetky polia parametrov symbolov a to aj užívateľom definované. Výstup následne uloží vo formáte csv.

Cieľom scriptu bolo dostať takýto zoznam do tabuľkového procesora, kde s použitím vhodných filtrov a zoradeniami, sa dá nájsť duplicita, chýbajúci parameter a podobne.
Tento účel script plne spĺňa.
Vďaka nemu vidím vo svojich knižniciach niektoré chyby a nedostatky.




Použitie
Andy99 síce popísal použitie na GitHub-e, no ja som ho použil trošku inak (Win 10).
Najskôr som nainštaloval python3
Následne som pomocou Win+R spustil command lajnu.
kde som už len zadal:

  1. kicad-export.py -i KiCAD_SymbolLIB_Adresár -o Cesta_výstupnéhoCSV.csv


A to je všetko.

Progres je asi takýto:
  1. C:\Users\EdizonTN\Documents\Workspace-KiCad\scripting\KiCad-to-csv-main>python kicad-export.py -i c:\Users\EdizonTN\Documents\Workspace-KiCad\LIB\SCH\ -o export.csv
  2. Start processing...
  3. Capacitor_Ceramic_THD2.50_50V_5perc_C0G-NP0_SRPassives.kicad_sym:220p, THD 2.50mm, 50V, +/-5% , C0G/NP0: "Checked" is missing
  4. Fuse_Eska.kicad_sym:T3,15A: "Sim.Enable" is missing
  5. Generic.kicad_sym:Mechanical Component: "Sim.Enable" is missing
  6. Mechanical_Part_Generic.kicad_sym:Italtronic-DIN Rail mount support-E107CL: "Sim.Enable" is missing
  7. Mechanical_Part_Generic.kicad_sym:Italtronic-DIN Rail mount support-E107G: "Sim.Enable" is missing
  8. Mechanical_Part_Generic.kicad_sym:Italtronic-DIN Rail mount support-E107L116.5M: "Sim.Enable" is missing
  9. Mechanical_Part_Generic.kicad_sym:Italtronic-DIN Rail mount support-E107L156.5M: "Sim.Enable" is missing
  10. Mechanical_Part_Generic.kicad_sym:Italtronic-DIN Rail mount support-E107L175M: "Sim.Enable" is missing
  11. Mechanical_Part_Generic.kicad_sym:Italtronic-DIN Rail mount support-E107L191.5: "Sim.Enable" is missing
  12. Mechanical_Part_Generic.kicad_sym:Italtronic-DIN Rail mount support-E107MT2: "Sim.Enable" is missing
  13. Mechanical_Part_Generic.kicad_sym:Italtronic-DIN Rail mount support-E72CL: "Sim.Enable" is missing
  14. Mechanical_Part_Generic.kicad_sym:Italtronic-DIN Rail mount support-E72G: "Sim.Enable" is missing
  15. Mechanical_Part_Generic.kicad_sym:Italtronic-DIN Rail mount support-E72L106.5: "Sim.Enable" is missing
  16. Mechanical_Part_Generic.kicad_sym:Italtronic-DIN Rail mount support-E72L117.75: "Sim.Enable" is missing
  17. Mechanical_Part_Generic.kicad_sym:Italtronic-DIN Rail mount support-E72L129: "Sim.Enable" is missing
  18. Mechanical_Part_Generic.kicad_sym:Italtronic-DIN Rail mount support-E72L140.25: "Sim.Enable" is missing
  19. Mechanical_Part_Generic.kicad_sym:Italtronic-DIN Rail mount support-E72MT2: "Sim.Enable" is missing
  20. Mechanical_Part_Generic.kicad_sym:Italtronic-DIN Rail mount support-EV: "Sim.Enable" is missing
  21. Mechanical_Part_Generic.kicad_sym:Mechanical Part Generic - non PCB: "Sim.Enable" is missing
  22. Mechanical_Part_Generic.kicad_sym:Potentiometer knob 6 mm, Dia{colon}16.00, H{colon}16.00, Gray: "Sim.Enable" is missing
  23. Mechanical_Part_Generic.kicad_sym:Potentiometer knob 6 mm, Dia{colon}16.00, H{colon}16.00, Red: "Sim.Enable" is missing
  24. noPCB-TerminalBlockPluggable_Phoenix.kicad_sym:FK-MCP 1,5/10-STF-3,81: "Sim.Enable" is missing
  25. noPCB-TerminalBlockPluggable_Phoenix.kicad_sym:FK-MCP 1,5/2-STF-3,81: "Sim.Enable" is missing
  26. noPCB-TerminalBlockPluggable_Phoenix.kicad_sym:FK-MCP 1,5/3-STF-3,81: "Sim.Enable" is missing
  27. noPCB-TerminalBlockPluggable_Phoenix.kicad_sym:FK-MCP 1,5/4-STF-3,81: "Sim.Enable" is missing
  28. noPCB-TerminalBlockPluggable_Phoenix.kicad_sym:FK-MCP 1,5/8-STF-3,81: "Sim.Enable" is missing
  29. noPCB-TerminalBlockPluggable_Phoenix.kicad_sym:MSTB 2.5/2-STF-5.08: "Sim.Enable" is missing
  30. Power_Symbol.kicad_sym:+12/24V_Arrow: "Signal_Name" is missing
  31. Power_Symbol.kicad_sym:+12/24V_Circle: "Signal_Name" is missing
  32. Power_Symbol.kicad_sym:+12V_Arrow: "Signal_Name" is missing
  33. Power_Symbol.kicad_sym:+12V_Circle: "Signal_Name" is missing
  34. Power_Symbol.kicad_sym:+15V_Arrow: "Signal_Name" is missing
  35. Power_Symbol.kicad_sym:+15V_Circle: "Signal_Name" is missing
  36. Power_Symbol.kicad_sym:+24VEXT_Arrow: "Signal_Name" is missing
  37. Power_Symbol.kicad_sym:+24VEXT_Circle: "Signal_Name" is missing
  38. Power_Symbol.kicad_sym:+24V_Arrow: "Signal_Name" is missing
  39. Power_Symbol.kicad_sym:+24V_Circle: "Signal_Name" is missing
  40. Power_Symbol.kicad_sym:+3V3_Arrow: "Signal_Name" is missing
  41. Power_Symbol.kicad_sym:+3V3_Circle: "Signal_Name" is missing
  42. Power_Symbol.kicad_sym:+3V_MCU_Arrow: "Signal_Name" is missing
  43. Power_Symbol.kicad_sym:+3V_MCU_Circle: "Signal_Name" is missing
  44. Power_Symbol.kicad_sym:+5V_Arrow: "Signal_Name" is missing
  45. Power_Symbol.kicad_sym:+5V_Circle: "Signal_Name" is missing
  46. Power_Symbol.kicad_sym:+Vext_Arrow: "Signal_Name" is missing
  47. Power_Symbol.kicad_sym:+Vext_Circle: "Signal_Name" is missing
  48. Power_Symbol.kicad_sym:GND_Bar: "Signal_Name" is missing
  49. Power_Symbol.kicad_sym:Ground_Shield: "Signal_Name" is missing
  50. Power_Symbol.kicad_sym:Pe_Earth: "Signal_Name" is missing
  51. Relay_Idec.kicad_sym:RJ1S-C-D12: "Sim.Enable" is missing
  52. Relay_Idec.kicad_sym:RJ1S-C-D24: "Sim.Enable" is missing
  53. Processing done


Výstup priebežne informuje, ktoré pole chýba pri akom prvku a v akej knižnici.



A časť výstupu v .csv vypadá takto:

  1. "Lib_PATH+FILENAME","SYMBOLNAME","Description","Keywords","Reference","Value","Footprint","Datasheet","Technology","MFG","MPN","Device_Marking","OC_LCSC","OC_MOUSER","OC_RS","OC_DISTRELEC","OC_TME","OC_FARNELL","OC_DIGIKEY","OC_SOS","Z-SYSCODE","Assembly_Note","Comment","ki_fp_filters"
  2. "c:\Users\EdizonTN\Documents\Workspace-KiCad\LIB\SCH\Audio_Loudity.kicad_sym","LD-BZEN-0803","Electromagnetic element polarised, 2.73kHz, 90mA, 2.5-4.5V, 85dB","BZ","RE","LD-BZEN-0803","SMD_Audio_Loudity:SPK_850X850H30-4N_LD-BZEN-0803_LOUDITY","https://www.tme.eu/Document/2868dc86e5832ce778a426be00b7263f/ld-bzen-0803.pdf","SMD","Loudity","LD-BZEN-0803","","","","","","LD-BZEN-0803","","","","","",""
  3. "c:\Users\EdizonTN\Documents\Workspace-KiCad\LIB\SCH\Audio_Multicomp.kicad_sym","ABT-410-RC","Electromagnetic element polarised, 2048Hz, 15mA, 1-3.0V, 80dB","BZ","RE","ABT-410-RC","THD_Audio_Multicomp:SPKADVV_650W60D1200H850-2N_ABT410_MULTICOMP","https://www.farnell.com/datasheets/2861429.pdf","THD","Multicomp","ABT-410-RC","","","","","","","1022402","","","","","","SPKADVV_650W60D1200H850-2?_ABT410_MULTICOMP*"
  4. "c:\Users\EdizonTN\Documents\Workspace-KiCad\LIB\SCH\Audio_Murata.kicad_sym","PKLCS1212E4001-R1","SMD Piezo element non polarised, 65 dB (4kHz)","BZ","RE","PKLCS1212E4001-R1","SMD_Audio_Murata:SPK_1200X1200H300-2N_PLKCS_MURATA","https://www.farnell.com/datasheets/2157985.pdf","SMD","Murata","PKLCS1212E4001-R1","","","","","","","1192551","","","1813","","","SPK_1200X1200H300-2?_PLKCS_MURATA*"
  5. "c:\Users\EdizonTN\Documents\Workspace-KiCad\LIB\SCH\Audio_TDK.kicad_sym","PS1240P02BT","SMD Piezo element non polarised, 70 dB (4kHz), 3V","BZ","RE","PS1240P02BT","THD_Audio_TDK:SPKADVV_500W65D1220H655-2N_PS12_TDK","https://product.tdk.com/system/files/dam/doc/product/sw_piezo/sw_piezo/piezo-buzzer/catalog/piezoelectronic_buzzer_ps_en.pdf","THD","TDK","PS1240P02BT","","C76871","","","","","3267212","","","","","","SPKADVV_500W65D1220H655-2?_PS12_TDK*"
  6. "c:\Users\EdizonTN\Documents\Workspace-KiCad\LIB\SCH\Capacitor_Ceramic_SMD_0603_50V_X7R_Samsung.kicad_sym","100n, SMD 0603, 50V, 10perc, X7R","Capacitor ceramic","","C","100n/50V","SMD_Capacitor_NonPolarised_Generic:CAPC1608X80N_0603","https://media.digikey.com/pdf/Data%20Sheets/Samsung%20PDFs/CL10B104KB8NNNC_Spec.pdf","SMD","Samsung","CL10B104KB8NNNC","","C1591","","","","","","1276-1000-1-ND","","3062","","","CAPC1608X80?_0603*"


Script pracuje s KiCad knižnicami verzie 7.

Odkazy
GitHub stránka scriptu: https://github.com/Mikrozone-Server/KiCad-to-csv - sem pridávajte prípadné hlásenia o chybách alebo Vaše námety na vylepšenie

p.s.: Dovolím si upozorniť, že na GitHub-e servera mikrozone, môžete nájsť aj farebnú schému pre KiCad podľa vzoru Altium Designera. Presne tu: https://github.com/Mikrozone-Server/KiCad-AD-Colors




Táto novinka je z mikroZONE
( http://mikrozone.sk/news.php?extend.1613 )