aboutsummaryrefslogtreecommitdiff
path: root/src/ee/tools
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2019-05-14 23:36:04 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2019-05-14 23:36:04 +0200
commitcf4c049a28c6718f1363c4e371ca141aaf679db6 (patch)
tree2bbb6c640a8b5529e52a2398029fe4715a225bc7 /src/ee/tools
parent66e4ca88a41dccdf6bc537929ea2bd3beb2001a3 (diff)
downloadee-python-cf4c049a28c6718f1363c4e371ca141aaf679db6.tar.gz
ee-python-cf4c049a28c6718f1363c4e371ca141aaf679db6.tar.bz2
ee-python-cf4c049a28c6718f1363c4e371ca141aaf679db6.tar.xz
ee-python-cf4c049a28c6718f1363c4e371ca141aaf679db6.zip
digikey-search-parts: Logging output to file.
Diffstat (limited to 'src/ee/tools')
-rw-r--r--src/ee/tools/digikey_search_parts.py5
-rw-r--r--src/ee/tools/templates/build.ninja.j22
2 files changed, 5 insertions, 2 deletions
diff --git a/src/ee/tools/digikey_search_parts.py b/src/ee/tools/digikey_search_parts.py
index 28ccbb9..44da21e 100644
--- a/src/ee/tools/digikey_search_parts.py
+++ b/src/ee/tools/digikey_search_parts.py
@@ -26,4 +26,7 @@ cache_dir = project.cache_dir / "digikey"
store_code = args.store
-search_parts(Path(args.in_path), Path(args.out), cache_dir, store_code)
+out_path = Path(args.out)
+log_path = out_path.parent / (out_path.name.replace(".xml", ".rst"))
+
+search_parts(Path(args.in_path), out_path, log_path, cache_dir, store_code)
diff --git a/src/ee/tools/templates/build.ninja.j2 b/src/ee/tools/templates/build.ninja.j2
index 47a099f..76da4cf 100644
--- a/src/ee/tools/templates/build.ninja.j2
+++ b/src/ee/tools/templates/build.ninja.j2
@@ -79,7 +79,7 @@ build ee/sch.xml: kicad-make-bom $sch
build ee/{{ s }}/pn-part-search-list.xml: pn-part-search-list ee/sch.xml
supplier = {{ s }}
-build ee/{{ s }}/downloaded.xml: {{ s }}-search-parts ee/{{ s }}/pn-part-search-list.xml
+build ee/{{ s }}/downloaded.xml | ee/{{ s }}/downloaded.rst: {{ s }}-search-parts ee/{{ s }}/pn-part-search-list.xml
build ee/{{ s }}/parts.xml: {{ s }}-normalize-facts ee/{{ s }}/downloaded.xml