FR or PLUGIN: Auto Update Manage footprints/libraries

I would like a batch file or script that can be run, say at KiCAD launch that will update Footprints and Libraries.

Desired behavior:

  1. At Launch.
  2. Clear footprints and symbols in KiCAD, do not remove default files.
  3. Following designated symbolic links saved to KiCAD.
  4. Open directories. Search files folders/files matching criteria.
  5. Sort by name. Append to directory, save and close file.
  6. Hand back to KiCAD.
  7. Advanced behavior may include recognition of changes and only update those changes. Perhaps also retain comments on entries.

Since KiCAD stores all of it’s libraries as “.kicad_sym”, I need the script to recursively search these files, and update. All files and folders also start with “USER.” so they are easily identified in the list and removed prior to each update. Similar for footprint files, where all folders end in “.pretty”, starts with “USER.” making them easy to sort and identify. Folders and Files have been named carefully with the expectation their name is the default entry name in KiCAD.

  • It is too bad that they cannot all be managed the same, rather than one bookmarks folder and the other book marks files. So many aspects of KiCAD look to have been very distinctly different software stitched together, still being integrated. Put 50 libraries in one file, but 50 footprints all need their own file. How about everything just gets its own file and we only need to insure the bookmarked folders are kept current. Then, files ARE auto updated at launch as footprints are now, as long as the folder is valid.

A)… I do not use 3rd party managers. I have not seen one that I liked. If you are developer of one of those managers, I do not mean to step on your toes, but you will likely not sell me on it no mater how hard to persist.

B)… If you are going to speak in Python or Java, please detail how to add and execute the files. There are great tools out there in both, but I have a storied past in trying to get them to execute correctly, and just making a mess. ie products like Electron and the myriad of tools to support that have to be installed from command line. We cannot all be command line experts, but I do try to understand. -Feel free to DM if you have anything to share.

C)… I do not alter the default files included with KiCAD as any update to KiCAD that includes Footprints and Libraries would break this. But due to the snails pace of files addition and update, I have no choice but to pull from 3rd party sources and spend time making libraries, footprints and models by hand from spec sheets where needed. -I look forward to being able to feed an AI a spec sheet and get generated Spice, Step, Footprint, and Libraries.

D)… An additional script (separate topic) that would be good to have is the WRL remover. Associations for WRL need to be changed to default STL. The reason being WRL contamination prevents a simple Export of a Finished PCB model. So what you see is not what you get without 3rd party tools installed, while KiCAD already has everything it needs.

E)… I am proactively making a lot of changes daily between two computers, growing my data base. So both must be updated and sync often. Although symbolic links make keeping them syn easier, it does not account for everything. Currently I must update both computers by hand almost daily. Windows complicates this by ignoring search rules and injecting results that violate the rules. -If you have questions, DM for that topic.

F)… Yes, links will be broken. hat will happen no matter what. I cannot be frozen with fear and create an endless number of copies just to never break a link. Update the link when I find a bad one, save and move on. If at some point a script or AI can detect and conduct repairs automatically, that would be even better. But I am not holding my breath.

Edited: 2024/01/16 to adjust formatting, expanded section E slightly.