From cf4c049a28c6718f1363c4e371ca141aaf679db6 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Tue, 14 May 2019 23:36:04 +0200 Subject: digikey-search-parts: Logging output to file. --- src/ee/tools/digikey_search_parts.py | 5 ++++- src/ee/tools/templates/build.ninja.j2 | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'src/ee/tools') 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 -- cgit v1.2.3