Skip to content

Commit

Permalink
fix scripts for newer Kicad version
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrei committed Apr 11, 2021
1 parent d3f21b6 commit 561aca8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bin/export_kicad_module_footprint.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,14 @@ def process_schematic(src_name, dst_name):
dst_f.write(")")

def process_pcb(src_name, dst_name):
global pat_close_symbol
with open(src_name, 'rt') as src_f, open(dst_name, 'w') as dst_f:
in_footprint = False
in_zone = False
for line in src_f:
m = pat_footprint.match(line)
if m:
if "Mod-Hellen" in m.group(2) and in_footprint == False:
if ("Mod-Hellen" in m.group(2) or "MOD_Hellen" in m.group(2)) and in_footprint == False:
print ("* Found footprint " + m.group(2))
# the close symbol should have the same indent as the open one
pat_close_symbol = re.compile(r'^' + m.group(1) + '\)')
Expand Down

0 comments on commit 561aca8

Please sign in to comment.