From a00dcfc7f6d12442fca8c5b7d43f12b707f0c877 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Tue, 9 Apr 2019 06:03:33 +0200 Subject: o Renaming part-create-distributor-search-list to pn-part-search-list. Making the search more narrow, it is only responsible to find parts based on MPN or SPN. --- src/ee/tools/templates/build.ninja.j2 | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) (limited to 'src/ee/tools/templates') diff --git a/src/ee/tools/templates/build.ninja.j2 b/src/ee/tools/templates/build.ninja.j2 index 23bef37..ea979da 100644 --- a/src/ee/tools/templates/build.ninja.j2 +++ b/src/ee/tools/templates/build.ninja.j2 @@ -21,9 +21,9 @@ rule kicad-make-bom description = kicad-make-bom $out command = $ee kicad-make-bom --sch $sch --out $out $strategy -rule part-create-distributor-search-list - description = part-create-distributor-search-list distributor: $distributor - command = $ee part-create-distributor-search-list --in $in --out $out +rule pn-part-search-list + description = pn-part-search-list supplier: $supplier + command = $ee pn-part-search-list --in $in --out $out --supplier $supplier rule digikey-search-parts description = digikey-search-parts @@ -45,6 +45,10 @@ rule create-bom description = create-bom command = $ee create-bom --schematic $schematic --part-db $part_dbs --out $out $strategy +rule export-order + description = export-order + command = $ee export-order --order $order $part_dbs --out-dir $out_dir + rule import-parts-yaml description = import-parts-yaml $in command = $ee import-parts-yaml --in $in --out $out @@ -61,16 +65,16 @@ build ee/sch.xml: kicad-make-bom $sch strategy = --strategy {{ project.cfg["kicad-project"]["strategy"] }} {%- endif %} {%- endif %} -{% for d in distributors %} -# Distributor {{ d }} -build ee/{{ d }}/search-list.xml: part-create-distributor-search-list ee/sch.xml - distributor = {{ d }} +{% for s in distributors %} +# Supplier {{ s }} +build ee/{{ s }}/search-list.xml: pn-part-search-list ee/sch.xml + supplier = {{ s }} -build ee/{{ d }}/downloaded.xml: {{ d }}-search-parts ee/{{ d }}/search-list.xml +build ee/{{ s }}/downloaded.xml: {{ s }}-search-parts ee/{{ s }}/search-list.xml -build ee/{{ d }}/normalized.xml: {{ d }}-normalize-facts ee/{{ d }}/downloaded.xml +build ee/{{ s }}/parts.xml: {{ s }}-normalize-facts ee/{{ s }}/downloaded.xml -default ee/{{ d }}/normalized.xml +default ee/{{ s }}/parts.xml {%- endfor %} {%- for f in parts_yaml_files %} @@ -86,7 +90,12 @@ build ee/bom.xml | $report_dir/bom.rst: create-bom ee/sch.xml {%- for p in part_ strategy = --strategy {{ project.cfg["create-bom"]["strategy"] }} {%- endif %} -default ee/bom.xml +build ee/orders/index.xml: export-order ee/bom.xml {%- for p in part_dbs %} {{ p }}.xml{% endfor %} + order = ee/bom.xml + part_dbs ={%- for p in part_dbs %} --part-db {{ p }}.xml{% endfor %} + out_dir = ee/orders + +default ee/orders/index.xml rule seeed-download-opl description = seeed-download-opl $opl -- cgit v1.2.3