aboutsummaryrefslogtreecommitdiff
path: root/src/ee/digikey
diff options
context:
space:
mode:
Diffstat (limited to 'src/ee/digikey')
-rw-r--r--src/ee/digikey/normalize_facts.py8
-rw-r--r--src/ee/digikey/search_parts.py8
2 files changed, 6 insertions, 10 deletions
diff --git a/src/ee/digikey/normalize_facts.py b/src/ee/digikey/normalize_facts.py
index 91e8c07..91ad4db 100644
--- a/src/ee/digikey/normalize_facts.py
+++ b/src/ee/digikey/normalize_facts.py
@@ -113,10 +113,8 @@ parsers: Mapping[int, Callable[[str], Any]] = {
}
-def normalize_facts(in_dir: Path, out_dir: Path):
- print("in: {}, out: {}".format(in_dir, out_dir))
-
- in_db = load_db(in_dir)
+def normalize_facts(in_path: Path, out_path: Path):
+ in_db = load_db(in_path)
out_parts = PartDb()
for part in in_db.iterparts(): # type: types.Part
@@ -155,4 +153,4 @@ def normalize_facts(in_dir: Path, out_dir: Path):
out_parts.add_entry(part, True)
print("Saving {} work parts".format(out_parts.size()))
- save_db(out_dir, out_parts)
+ save_db(out_path, out_parts)
diff --git a/src/ee/digikey/search_parts.py b/src/ee/digikey/search_parts.py
index 4203624..4f637c7 100644
--- a/src/ee/digikey/search_parts.py
+++ b/src/ee/digikey/search_parts.py
@@ -38,10 +38,8 @@ def resolved(p: DigikeyProduct) -> types.Part:
return part
-def search_parts(in_dir: Path, out_dir: Path, cache_dir: Path, force_refresh: bool):
- print("in: {}, out: {}".format(in_dir, out_dir))
-
- in_db = load_db(in_dir)
+def search_parts(in_path: Path, out_path: Path, cache_dir: Path):
+ in_db = load_db(in_path)
out_parts = PartDb()
parser = DigikeyParser(Digikey())
@@ -103,4 +101,4 @@ def search_parts(in_dir: Path, out_dir: Path, cache_dir: Path, force_refresh: bo
out_parts.add_entry(out_part, True)
print("Saving {} work parts".format(out_parts.size()))
- save_db(out_dir, out_parts)
+ save_db(out_path, out_parts)