From 16287b0b4b4532d01894d0df8a41969ea2766386 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Thu, 12 Nov 2015 17:22:48 -0800 Subject: [PATCH] Create mouser parts list file in a directly-importable form Signed-off-by: Keith Packard --- bin/partslist-vendor | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/bin/partslist-vendor b/bin/partslist-vendor index e813ec7..7454a92 100755 --- 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) { -- 2.47.2