diff options
author | xengineering <me@xengineering.eu> | 2025-01-03 21:20:34 +0100 |
---|---|---|
committer | xengineering <me@xengineering.eu> | 2025-01-03 22:12:44 +0100 |
commit | ded26479a35ab2493b667785804205bc3a1a5f84 (patch) | |
tree | 1f8ea0a1fa7f774b71b87bcacfd1a19a20bd4652 /pcb | |
parent | e31f926e0efe97db48f1f01ff5fe5e90af0a03c5 (diff) | |
download | soundbox-ded26479a35ab2493b667785804205bc3a1a5f84.tar soundbox-ded26479a35ab2493b667785804205bc3a1a5f84.tar.zst soundbox-ded26479a35ab2493b667785804205bc3a1a5f84.zip |
pcb: Add print-bom.sh
Diffstat (limited to 'pcb')
-rwxr-xr-x | pcb/print-bom.sh | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/pcb/print-bom.sh b/pcb/print-bom.sh new file mode 100755 index 0000000..9bd8007 --- /dev/null +++ b/pcb/print-bom.sh @@ -0,0 +1,21 @@ +#!/bin/sh + + +set -euf + + +SCRIPT_PATH="$0" +PCB_PATH="$(dirname "${SCRIPT_PATH}")" +INPUT_PATH="${PCB_PATH}/soundbox.kicad_sch" +OUTPUT_PATH="$(mktemp -t --suffix '.csv' kicad-bom-XXXX)" + +FIELDS='Reference,Description,Value' + + +kicad-cli sch export bom \ + -o "$OUTPUT_PATH" \ + --fields "$FIELDS" \ + "$INPUT_PATH" + +cat "$OUTPUT_PATH" +rm "$OUTPUT_PATH" |