From d8bb3aa6f51b331ef6ce3558707627be7a50c7ad Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Mon, 27 May 2019 15:16:12 +0200 Subject: souffle: o Allowing to set MPNs when importing facts. o ninja: Allowing the user to have its own datalog files under ee/custom/kicad-souffle.dl and ee/custom/$supplier-souffle.dl. make_bom: Generate per-field URIs for custom URIs. Better than making values that contain custom field name + value. --- src/ee/souffle/digikey.dl | 3 +++ src/ee/souffle/kicad-mpn.dl | 8 ++++++++ src/ee/souffle/kicad.dl | 1 + 3 files changed, 12 insertions(+) create mode 100644 src/ee/souffle/kicad-mpn.dl (limited to 'src/ee/souffle') diff --git a/src/ee/souffle/digikey.dl b/src/ee/souffle/digikey.dl index 735dd2d..06123ea 100644 --- a/src/ee/souffle/digikey.dl +++ b/src/ee/souffle/digikey.dl @@ -1,3 +1,6 @@ #include "facts.dl" .output fact + +fact(part, "http://purl.org/ee/fact-type/footprint", "1005") :- + fact(part, "http://purl.org/ee/digikey-fact-key#16", "0402 (1005 Metric)"). diff --git a/src/ee/souffle/kicad-mpn.dl b/src/ee/souffle/kicad-mpn.dl new file mode 100644 index 0000000..5f92dd9 --- /dev/null +++ b/src/ee/souffle/kicad-mpn.dl @@ -0,0 +1,8 @@ +.decl mpn(part:symbol, mpn:symbol) +.output mpn + +mpn(part, value) :- + fact(part, "http://purl.org/ee/kicad-sch-custom-fact-type#mpn", value). + +mpn(part, value) :- + fact(part, "http://purl.org/ee/kicad-sch-custom-fact-type#MPN", value). diff --git a/src/ee/souffle/kicad.dl b/src/ee/souffle/kicad.dl index 5448b05..16b76dd 100644 --- a/src/ee/souffle/kicad.dl +++ b/src/ee/souffle/kicad.dl @@ -1,4 +1,5 @@ #include "facts.dl" +#include "kicad-mpn.dl" .output fact -- cgit v1.2.3