import argparse from pathlib import Path import ee.tools from ee.bom import create_bom from ee.project import Project parser = argparse.ArgumentParser() ee.tools.add_default_argparse_group(parser) parser.add_argument("--schematic", required=True, metavar="PART DB") parser.add_argument("--out", required=True, metavar="PART DB") parser.add_argument("--part-db", nargs="*", required=True, metavar="PART DB") parser.add_argument("--strategy", metavar="FUNC") args = parser.parse_args() ee.tools.process_default_argparse_group(args) project = Project.load() part_db_dirs = [Path(part_db) for part_db in args.part_db] fail_on_missing_parts = False create_bom(project, Path(args.schematic), Path(args.out), part_db_dirs, fail_on_missing_parts, args.strategy)