import argparse from pathlib import Path import ee.tools from ee.element14 import Element14Config from ee.element14.search_parts import search_parts from ee.project import Project parser = argparse.ArgumentParser() ee.tools.add_default_argparse_group(parser) parser.add_argument("--in", dest="in_path", required=True, metavar="PART DB") parser.add_argument("--out", required=True, metavar="PART DB") args = parser.parse_args() ee.tools.process_default_argparse_group(args) project = Project.load() cache_dir = project.cache_dir / "element14" e14_config = Element14Config( store=project.cfg.get("element14", "store", fallback=None), api_key=project.cfg.get("element14", "api-key", fallback=None) ) search_parts(Path(args.in_path), Path(args.out), cache_dir, e14_config)