← Commit history

Delete design/gen/nc_nets.py

John Lauer ·3ca9a79af0 ·7d ago ·parent e5fe607
1 file changed −14
design/gen/nc_nets.pydeleted−14
@@ -1,14 +0,0 @@-#!/usr/bin/env python3-"""From KiCad's exported schematic netlist, the names KiCad gives unconnected pins ('unconnected-(J1A-SMRST0#-PadA9)'),-so the board's unused pads carry the same net and schematic parity is exact."""-import re, json, os, sys-ROOT = os.path.join(os.path.dirname(__file__), "..")-t = re.sub(r"\s+", " ", open(os.path.join(ROOT, "kicad", "sch.net")).read())-out = {}-for b in t.split("(net (code")[1:]:-    name = re.search(r'\(name "([^"]*)"\)', b).group(1)-    if name.startswith("unconnected-"):-        for r, p in re.findall(r'\(node \(ref "([^"]+)"\) \(pin "([^"]+)"\)', b):-            out[f"{r}.{p}"] = name-json.dump(out, open(os.path.join(ROOT, "design", "nc_nets.json"), "w"), indent=0)-print(len(out), "unconnected pins named")