|
|
|
@ -73,7 +73,19 @@ os.chdir(pathToProjectFolder)
|
|
|
|
|
print(pathToProjectFolder)
|
|
|
|
|
try:
|
|
|
|
|
with open("sym-lib-table",'w') as file:
|
|
|
|
|
file.write("(fp_lib_table\n (version 7)\n)")
|
|
|
|
|
file.write("(fp_lib_table\n (version 7)\n")
|
|
|
|
|
|
|
|
|
|
if 1:
|
|
|
|
|
for p in sps:
|
|
|
|
|
# example
|
|
|
|
|
# (lib (name "000_SDM_Resistor")(type "KiCad")(uri "${KIPRJMOD}/test_lib/footprints/000_SDM_Resistor.pretty")(options "")(descr ""))
|
|
|
|
|
file.write(" (lib (name \"")
|
|
|
|
|
file.write(os.path.basename(p))
|
|
|
|
|
file.write("\"(type \"KiCad\")(uri \"")
|
|
|
|
|
file.write(p)
|
|
|
|
|
file.write("\")(options \"\")(descr \"\"))\n")
|
|
|
|
|
|
|
|
|
|
file.write(")")
|
|
|
|
|
os.chdir(cwd)
|
|
|
|
|
except FileNotFoundError:
|
|
|
|
|
print("fail")
|
|
|
|
|