From 74878e8f5c8c3432d2b34f1d16b4cf307ed4583b Mon Sep 17 00:00:00 2001 From: xengineering Date: Fri, 3 Jan 2025 21:20:34 +0100 Subject: pcb: Add print-bom.sh --- pcb/print-bom.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 pcb/print-bom.sh (limited to 'pcb') 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" -- cgit v1.2.3-70-g09d2