diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2019-03-29 16:41:25 +0100 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2019-03-29 16:41:25 +0100 |
commit | 73c63d8c307bdbeb534c24fb51d4093c2fcbb86d (patch) | |
tree | d568efbdbc05d16de5635fa0011f96286f807b7e /src/ee/tools/digikey_search_parts.py | |
parent | 87e603088ad8e311c11e3e072340588175cc4e6e (diff) | |
download | ee-python-73c63d8c307bdbeb534c24fb51d4093c2fcbb86d.tar.gz ee-python-73c63d8c307bdbeb534c24fb51d4093c2fcbb86d.tar.bz2 ee-python-73c63d8c307bdbeb534c24fb51d4093c2fcbb86d.tar.xz ee-python-73c63d8c307bdbeb534c24fb51d4093c2fcbb86d.zip |
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.
Diffstat (limited to 'src/ee/tools/digikey_search_parts.py')
-rw-r--r-- | src/ee/tools/digikey_search_parts.py | 6 |
1 files changed, 4 insertions, 2 deletions
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) |