import argparse from pathlib import Path from ee.bom import create_bom from ee.project import Project parser = argparse.ArgumentParser() 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() 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)