aboutsummaryrefslogtreecommitdiff
path: root/src/ee/kicad
diff options
context:
space:
mode:
Diffstat (limited to 'src/ee/kicad')
-rw-r--r--src/ee/kicad/make_bom.py2
-rw-r--r--src/ee/kicad/sch_fact_types.py5
2 files changed, 4 insertions, 3 deletions
diff --git a/src/ee/kicad/make_bom.py b/src/ee/kicad/make_bom.py
index aa735b3..6069fcc 100644
--- a/src/ee/kicad/make_bom.py
+++ b/src/ee/kicad/make_bom.py
@@ -67,7 +67,7 @@ def work(sch, out: Path, project_uuid: UUID, new_mode, pretty):
for f in c.named_fields:
if f.value is not None and len(f.value):
- part.facts.add(sch_fact_types.field, "{}:{}".format(f.name, f.value))
+ part.facts.add(sch_fact_types.make_custom_field_key(f.name), f.value)
parts.add_entry(part, True)
diff --git a/src/ee/kicad/sch_fact_types.py b/src/ee/kicad/sch_fact_types.py
index c9ea918..0e6ee1c 100644
--- a/src/ee/kicad/sch_fact_types.py
+++ b/src/ee/kicad/sch_fact_types.py
@@ -4,6 +4,9 @@ from ee.part import FactType
def make_fact_key(key: str):
return "http://purl.org/ee/kicad-sch-fact-type#{}".format(key)
+def make_custom_field_key(field_name: str):
+ return "http://purl.org/ee/kicad-sch-custom-fact-type#{}".format(field_name)
+
value = FactType(make_fact_key("value"), "Value")
component = FactType(make_fact_key("component"), "Value")
@@ -14,5 +17,3 @@ symbol_name = FactType(make_fact_key("symbol-name"), "Value")
footprint = FactType(make_fact_key("footprint"), "Value")
footprint_library = FactType(make_fact_key("footprint-library"), "Value")
footprint_name = FactType(make_fact_key("footprint-name"), "Value")
-
-field = FactType(make_fact_key("field"), "Value")