Script will now print out list of parts with no price that have BOM entries
This commit is contained in:
parent
e1c8a7bc3c
commit
95a41e1443
20
README.md
20
README.md
|
@ -41,21 +41,21 @@ Actual price of a full build may be higher.
|
||||||
|
|
||||||
| Part | Qty | Cost (USD) |
|
| Part | Qty | Cost (USD) |
|
||||||
|-------------------------------------|-----|------------|
|
|-------------------------------------|-----|------------|
|
||||||
| M4 hex bolt 40mm | 4 | 5.0 |
|
| M4 hex bolt 40mm | 4 | 2.4 |
|
||||||
| M3 sliding t slot nut | 25 | 1.5 |
|
| M3 sliding t slot nut | 25 | 1.25 |
|
||||||
| M3 hex cap bolt 8mm | 25 | 2.25 |
|
| M3 hex cap bolt 8mm | 25 | 2.0 |
|
||||||
| M3 hex cap bolt 6mm | 8 | 0.56 |
|
| M3 hex cap bolt 6mm | 8 | 0.56 |
|
||||||
| M3 hex cap bolt 12mm | 1 | 0.0 |
|
| M3 hex cap bolt 12mm | 1 | 0.08 |
|
||||||
| L298N Motor driver module | 1 | 2.89 |
|
| L298N Motor driver module | 1 | 2.87 |
|
||||||
| ESP32 GPIO breakout board | 1 | 5.99 |
|
| ESP32 GPIO breakout board | 1 | 5.99 |
|
||||||
| ESP32 Dev board | 1 | 6.66 |
|
| ESP32 Dev board | 1 | 6.66 |
|
||||||
|
| 608-RS Ball Bearing | 1 | 0.17 |
|
||||||
| 250RPM DC geared motor | 2 | 29.98 |
|
| 250RPM DC geared motor | 2 | 29.98 |
|
||||||
| 2020 Aluminum extrusion 420mm | 2 | 5.22 |
|
| 2020 Aluminum extrusion 420mm | 2 | 5.1 |
|
||||||
| 2020 Aluminum extrusion 260mm | 4 | 6.44 |
|
| 2020 Aluminum extrusion 260mm | 4 | 6.4 |
|
||||||
| 100RPM DC geared motor with encoder | 1 | 17.02 |
|
| 100RPM DC geared motor with encoder | 1 | 16.19 |
|
||||||
|---------|---------------|------------------------------------|
|
|---------|---------------|------------------------------------|
|
||||||
| TOTAL | 75 | 83.51 |
|
| TOTAL | 76 | 79.65 |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- /bom -->
|
<!-- /bom -->
|
||||||
|
|
|
@ -3,7 +3,7 @@ quantity,part,part_id,price
|
||||||
25,"M3 sliding t slot nut",N/A,125
|
25,"M3 sliding t slot nut",N/A,125
|
||||||
25,"M3 hex cap bolt 8mm",N/A,200
|
25,"M3 hex cap bolt 8mm",N/A,200
|
||||||
8,"M3 hex cap bolt 6mm",N/A,56
|
8,"M3 hex cap bolt 6mm",N/A,56
|
||||||
1,"M3 hex cap bolt 12mm",N/A,0
|
1,"M3 hex cap bolt 12mm",N/A,8
|
||||||
1,"L298N Motor driver module",N/A,287
|
1,"L298N Motor driver module",N/A,287
|
||||||
1,"ESP32 GPIO breakout board",N/A,599
|
1,"ESP32 GPIO breakout board",N/A,599
|
||||||
1,"ESP32 Dev board",N/A,666
|
1,"ESP32 Dev board",N/A,666
|
||||||
|
@ -12,4 +12,4 @@ quantity,part,part_id,price
|
||||||
2,"2020 Aluminum extrusion 420mm",N/A,510
|
2,"2020 Aluminum extrusion 420mm",N/A,510
|
||||||
4,"2020 Aluminum extrusion 260mm",N/A,640
|
4,"2020 Aluminum extrusion 260mm",N/A,640
|
||||||
1,"100RPM DC geared motor with encoder",N/A,1619
|
1,"100RPM DC geared motor with encoder",N/A,1619
|
||||||
76,TOTAL,N/A,7957
|
76,TOTAL,N/A,7965
|
||||||
|
|
|
|
@ -2,6 +2,7 @@ part,part_id,price,quantity,url
|
||||||
M3 hex nut,N/A,999,300,https://amzn.to/4hAnwjc
|
M3 hex nut,N/A,999,300,https://amzn.to/4hAnwjc
|
||||||
M3 hex cap bolt 6mm,N/A,726,100,https://amzn.to/3AwiZxo
|
M3 hex cap bolt 6mm,N/A,726,100,https://amzn.to/3AwiZxo
|
||||||
M3 hex cap bolt 8mm,N/A,899,100,https://amzn.to/3YEvWNB
|
M3 hex cap bolt 8mm,N/A,899,100,https://amzn.to/3YEvWNB
|
||||||
|
M3 hex cap bolt 12mm,N/A,836,100,https://amzn.to/48CGa5Y
|
||||||
M3 sliding t slot nut,N/A,599,105,https://amzn.to/48GRrSU
|
M3 sliding t slot nut,N/A,599,105,https://amzn.to/48GRrSU
|
||||||
2020 Aluminum extrusion 260mm,N/A,7399,46,https://amzn.to/418OicC
|
2020 Aluminum extrusion 260mm,N/A,7399,46,https://amzn.to/418OicC
|
||||||
2020 Aluminum extrusion 420mm,N/A,7399,29,https://amzn.to/418OicC
|
2020 Aluminum extrusion 420mm,N/A,7399,29,https://amzn.to/418OicC
|
||||||
|
|
|
|
@ -62,3 +62,11 @@ sqlite3 :memory: -cmd '.mode csv' -cmd ".import ${TOTAL} bom" -cmd '.mode markdo
|
||||||
|
|
||||||
sqlite3 :memory: -cmd '.mode csv' -cmd ".import ${TOTAL} bom"\
|
sqlite3 :memory: -cmd '.mode csv' -cmd ".import ${TOTAL} bom"\
|
||||||
"SELECT SUM(quantity), 'TOTAL', 'N/A', SUM(price) FROM bom;" | tr -d '"' >> "${TOTAL}"
|
"SELECT SUM(quantity), 'TOTAL', 'N/A', SUM(price) FROM bom;" | tr -d '"' >> "${TOTAL}"
|
||||||
|
|
||||||
|
NONEFOUND=$(sqlite3 :memory: -cmd '.mode csv' -cmd ".import ${DESTINATION} bom" -cmd ".import ${PRICES} prices" -cmd '.mode column' -cmd '.headers off' \
|
||||||
|
'SELECT DISTINCT part FROM bom WHERE part NOT IN (SELECT part FROM prices) ORDER BY part;')
|
||||||
|
|
||||||
|
if [[ "${NONEFOUND}" != "" ]]; then
|
||||||
|
echo "No price found for the following parts:"
|
||||||
|
echo "${NONEFOUND}"
|
||||||
|
fi
|
Loading…
Reference in New Issue