From 73c63d8c307bdbeb534c24fb51d4093c2fcbb86d Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Fri, 29 Mar 2019 16:41:25 +0100 Subject: Project: o adding cache_dir field, useful for controlling where cached data is placed from a central place. o Updating tools to use this new variable. --- src/ee/tools/digikey_search_parts.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/ee/tools/digikey_search_parts.py') diff --git a/src/ee/tools/digikey_search_parts.py b/src/ee/tools/digikey_search_parts.py index 9f35e33..6cf104d 100644 --- a/src/ee/tools/digikey_search_parts.py +++ b/src/ee/tools/digikey_search_parts.py @@ -2,6 +2,7 @@ import argparse from pathlib import Path from ee.digikey.search_parts import search_parts +from ee.project import Project parser = argparse.ArgumentParser() @@ -16,6 +17,7 @@ parser.add_argument("--out", args = parser.parse_args() -cache_dir = ".ee/cache/digikey" +project = Project.load() +cache_dir = project.cache_dir / "digikey" -search_parts(Path(args.in_path), Path(args.out), Path(cache_dir)) +search_parts(Path(args.in_path), Path(args.out), cache_dir) -- cgit v1.2.3