From b5da967a97c628e576d8f524c0a9c6302e408926 Mon Sep 17 00:00:00 2001 From: Andrei Date: Thu, 7 Oct 2021 20:19:01 +0300 Subject: [PATCH] custom prefix for copy_from_Kicad.py --- bin/copy_from_Kicad.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/bin/copy_from_Kicad.py b/bin/copy_from_Kicad.py index bacb686..305a9ea 100644 --- a/bin/copy_from_Kicad.py +++ b/bin/copy_from_Kicad.py @@ -21,11 +21,15 @@ gerber_rel_path = sys.argv[3] name = sys.argv[4] rev = sys.argv[5] +prefix = "hellen" +if (":" in type): + (type, prefix) = type.split(":") + if (type == "frames"): - base_path = project_base + "/hellen" + name + "/boards/hellen" + name + "-" + rev + base_path = project_base + "/" + prefix + name + "/boards/" + prefix + name + "-" + rev src_path = base_path + "/" + gerber_rel_path dst_path = base_path + "/frame" - src_name = src_path + "/hellen" + name + src_name = src_path + "/" + prefix + name dst_name = dst_path + "/" + name else: # modules src_path = project_base + "/hellen1-" + name + "/" + gerber_rel_path