projects
/
hw
/
altusmetrum
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ad14256
)
Create mouser parts list file in a directly-importable form
author
Keith Packard
<keithp@keithp.com>
Fri, 13 Nov 2015 01:22:48 +0000
(17:22 -0800)
committer
Keith Packard
<keithp@keithp.com>
Fri, 13 Nov 2015 01:22:48 +0000
(17:22 -0800)
Signed-off-by: Keith Packard <keithp@keithp.com>
bin/partslist-vendor
patch
|
blob
|
history
diff --git
a/bin/partslist-vendor
b/bin/partslist-vendor
index e813ec73b592c724cc20338f656f9123b1042abe..7454a92842be9847d376bc6a98f7d91b14929be6 100755
(executable)
--- a/
bin/partslist-vendor
+++ b/
bin/partslist-vendor
@@
-127,7
+127,19
@@
void process_mouser(string[string] entry)
{
if (entry["loadstatus"] == "noload")
return;
- printf("%s|%s\n", part_number(entry), entry["quantity"]);
+/* printf("%s|%s\n", part_number(entry), entry["quantity"]); */
+
+ static bool start = true;
+
+ if (start) {
+ printf("Mouser Part Number,Manufacturer Part Number,Quantity 1\n");
+ start = false;
+ }
+
+ printf("%s,%s,%s\n",
+ entry["vendor_part_number"],
+ entry["mfg_part_number"],
+ entry["quantity"]);
}
void process_other(string[string] entry) {