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 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)