aboutsummaryrefslogtreecommitdiff
path: root/src/ee/digikey
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2019-10-15 15:52:36 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2019-10-15 15:52:36 +0200
commit08b04ded18e8b41818b5f3abb005c22b02f767b8 (patch)
tree4bf5f84ad2bd94d74681d3ba87ec154df6592fde /src/ee/digikey
parent69e3e5ef16a14956e2077891ae9acb835317011e (diff)
downloadee-python-08b04ded18e8b41818b5f3abb005c22b02f767b8.tar.gz
ee-python-08b04ded18e8b41818b5f3abb005c22b02f767b8.tar.bz2
ee-python-08b04ded18e8b41818b5f3abb005c22b02f767b8.tar.xz
ee-python-08b04ded18e8b41818b5f3abb005c22b02f767b8.zip
digikey bom: Adding MPN in addition to SPN.
Diffstat (limited to 'src/ee/digikey')
-rw-r--r--src/ee/digikey/bom.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ee/digikey/bom.py b/src/ee/digikey/bom.py
index cb02f05..bf5456c 100644
--- a/src/ee/digikey/bom.py
+++ b/src/ee/digikey/bom.py
@@ -19,11 +19,12 @@ def create_bom(bom_path: Path, part_files: List[Path], out_path: Path, allow_inc
with out_path.open("w") as f:
w = csv.writer(f)
- w.writerow(["Digi-Key Part Number", "Quantity", "Reference Designator"])
+ w.writerow(["Digi-Key Part Number", "Manufacturer Part Number", "Quantity", "Reference Designator"])
for line in bom.lines:
line = [
line.part.get_exactly_one_spn().valueProp,
+ line.part.get_exactly_one_mpn().valueProp,
int(ceil(len(line.refs) * quantity)),
join_refs(line.refs)]
w.writerow([str(cell) for cell in line])