main
John Lauer
Preserve board29, component assets and scaffold-fit correction candidate with reviewed footage
c54169e
#!/usr/bin/env python3
import json,subprocess
from pathlib import Path
P=Path(__file__).resolve().parents[1];root='C:/Users/john/adom-projects/adom-custom-electronic-load/kicad';exe='C:/Users/john/AppData/Local/Programs/KiCad/10.0/bin/kicad-cli.exe'
def ab(v,a):
r=subprocess.run(['adom-bridge','--target','AdomLapper','--ai-thread','adom-custom-load',v,json.dumps(a)],capture_output=True,text=True);return json.loads(r.stdout)
for args,file in [('sch export netlist -o','exported.net'),('sch erc --format json -o','erc.json')]:
r=ab('shell_execute',{'command':f'"{exe}" {args} "{root}/{file}" "{root}/adom-custom-electronic-load.kicad_sch"','reason':'Run native KiCad schematic electrical and connectivity checks','timeoutSeconds':45});print(r.get('stdout'),r.get('stderr'));(P/'design'/('check-'+file+'.json')).write_text(json.dumps(r,indent=2))
ab('pull_file',{'filePaths':[root+'/exported.net',root+'/erc.json'],'saveTo':str(P/'kicad')})