datasheets: Add a couple Newhaven bitmap displays
[hw/altusmetrum] / bin / extract-board-parts
1 #!/bin/sh
2 # extract parts from a gEDA schematic for addition to preferred parts database
3 # Copyright 2015 Bdale Garbee <bdale@gag.com>, GPLv3+
4 # assumes attribs file contents like:
5 #       device
6 #       value
7 #       footprint
8 #       loadstatus
9 #       provided
10 #       mfg_part_number
11 #       vendor
12 #       vendor_part_number
13
14 gnetlist -g bom -o - $1.sch \
15         | head -1 \
16         | awk '{ printf("%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n", $2, $3, $4, $5, $6, $7, $8, $9) }' 
17
18 gnetlist -g bom -o - $1.sch \
19         | tail -n +2 \
20         | awk '{ printf("%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n", $2, $3, $4, $5, "no", $7, $8, $9) }' \
21         | sort | uniq
22