Date:2010-10-16 13:17:35 (7 years 9 months ago)
Author:Werner Almesberger
Commit:7190706c6e74961e2950721fd61ea02967f36c9c
Message:boom/mbq2lst: utility to generate a KiCad-style BOM from a more human-friendly version.

Files: boom/mbq2lst (1 diff)

Change Details

boom/mbq2lst
1#!/usr/bin/perl
2
3#
4# Format:
5#
6# number comp_ref_category footprint value ...
7#
8
9print "eeschema (whatever) >> some date\n\n";
10print "#Cmp ( order = Reference )\n";
11while (<>) {
12    s/#.*//;
13    next if /^\s*$/;
14    @a = split(/\s+/, $_);
15    $n = shift @a;
16    $cref = shift @a;
17    $fp = shift @a;
18    $value = shift @a;
19    for ($i = 0; $i != $n; $i++) {
20        $p++;
21        print "| $cref$p\t$value\t; $fp\t";
22        for (@a) {
23            print "; $_\t";
24        }
25        print "\n";
26    }
27}
28print "#End Cmp\n";

Archive Download the corresponding diff file

Branches:
master



interactive