Files

copied
Last update 3 months 3 weeks by Matt M
Files
LTC2946_breakout
bulkhead_terminal_block
fcb_footprints.pretty
fcb_v2
fcb_v2_gpsonly
fcgps_elvin
groundstation_v3
groundstation_v4
line_cutter_r5
mini_fcb_v2
protection_breakout
.gitignore
README.md
fcb_v2-20240209.zip
fcb_v2_lib.bak
fcb_v2_lib.kicad_sym
import.py
requirements.txt
import.py
import glob import os from kiutils.symbol import SymbolLib for f in glob.iglob('import/**/*', recursive=True): if f.endswith("kicad_sym"): # Is symbol -- append to big symbol list new_lib = SymbolLib.from_file(f) fcb_lib = SymbolLib.from_file("fcb_v2_lib.kicad_sym") existing_symbol_names = [it.entryName for it in fcb_lib.symbols] for it in new_lib.symbols: if it.entryName not in existing_symbol_names: fcb_lib.symbols.append(it) print(f"Added {it.entryName} to big library") else: print("Symbol already in library -- not replacing") # Everything's in Git, we don't care if we blow local changes away. S3ndit fcb_lib.to_file("fcb_v2_lib.kicad_sym") os.remove(f) print("Wrote new changes") if f.lower().endswith("step") or f.lower().endswith("kicad_mod"): # file is footprint/3d model -- copy in new_path = os.path.join("fcb_footprints.pretty", f.split(os.sep)[-1]) if not os.path.exists(new_path): os.rename(f, new_path) print(f"imported {new_path}") else: print(f"file {new_path} exists -- not replacing")
Report a bug