import argparse from pathlib import Path from ee.digikey.search_parts import search_parts from ee.project import Project parser = argparse.ArgumentParser() parser.add_argument("--in", dest="in_path", required=True, metavar="PART DB") parser.add_argument("--out", required=True, metavar="PART DB") parser.add_argument("--store", default="us", metavar="STORE CODE") args = parser.parse_args() project = Project.load() cache_dir = project.cache_dir / "digikey" store_code = args.store search_parts(Path(args.in_path), Path(args.out), cache_dir, store_code)