summaryrefslogtreecommitdiff
path: root/pcb
diff options
context:
space:
mode:
authorxengineering <me@xengineering.eu>2025-01-03 21:20:34 +0100
committerxengineering <me@xengineering.eu>2025-01-04 20:51:59 +0100
commit74878e8f5c8c3432d2b34f1d16b4cf307ed4583b (patch)
tree667ea6b0a2c954637e3c46c7c4031f52047d75aa /pcb
parent601b602179c878285fdbcced92470b4324bec583 (diff)
downloadsoundbox-74878e8f5c8c3432d2b34f1d16b4cf307ed4583b.tar
soundbox-74878e8f5c8c3432d2b34f1d16b4cf307ed4583b.tar.zst
soundbox-74878e8f5c8c3432d2b34f1d16b4cf307ed4583b.zip
pcb: Add print-bom.sh
Diffstat (limited to 'pcb')
-rwxr-xr-xpcb/print-bom.sh21
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"