mirror of
git://projects.qi-hardware.com/eda-tools.git
synced 2024-11-04 22:58:26 +02:00
boom/mbq2lst: utility to generate a KiCad-style BOM from a more human-friendly
version.
This commit is contained in:
parent
d4d34d7cb0
commit
7190706c6e
28
boom/mbq2lst
Executable file
28
boom/mbq2lst
Executable file
@ -0,0 +1,28 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
#
|
||||
# Format:
|
||||
#
|
||||
# number comp_ref_category footprint value ...
|
||||
#
|
||||
|
||||
print "eeschema (whatever) >> some date\n\n";
|
||||
print "#Cmp ( order = Reference )\n";
|
||||
while (<>) {
|
||||
s/#.*//;
|
||||
next if /^\s*$/;
|
||||
@a = split(/\s+/, $_);
|
||||
$n = shift @a;
|
||||
$cref = shift @a;
|
||||
$fp = shift @a;
|
||||
$value = shift @a;
|
||||
for ($i = 0; $i != $n; $i++) {
|
||||
$p++;
|
||||
print "| $cref$p\t$value\t; $fp\t";
|
||||
for (@a) {
|
||||
print "; $_\t";
|
||||
}
|
||||
print "\n";
|
||||
}
|
||||
}
|
||||
print "#End Cmp\n";
|
Loading…
Reference in New Issue
Block a user