Commit 4f784034 authored by Dick Hollenbeck's avatar Dick Hollenbeck
Browse files

BOM generators now report count of "interesting" components, rather than total components

parent 0ae31f3e
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -34,15 +34,15 @@ def writerow( acsvwriter, columns ):
        utf8row.append( str(col).encode('utf8') )
    acsvwriter.writerow( utf8row )

components = net.getInterestingComponents()

# Output a field delimited header line
writerow( out, ['Source:', net.getSource()] )
writerow( out, ['Date:', net.getDate()] )
writerow( out, ['Tool:', net.getTool()] )
writerow( out, ['Component Count:', len(net.components)] )
writerow( out, ['Component Count:', len(components)] )
writerow( out, ['Ref', 'Value', 'Part', 'Documentation', 'Description', 'Vendor'] )

components = net.getInterestingComponents()

# Output all of the component information
for c in components:
    writerow( out, [c.getRef(), c.getValue(), c.getLibName() + ":" + c.getPartName(),
+3 −3
Original line number Diff line number Diff line
@@ -33,15 +33,15 @@ def writerow( acsvwriter, columns ):
        utf8row.append( str(col).encode('utf8') )
    acsvwriter.writerow( utf8row )

components = net.getInterestingComponents()

# Output a field delimited header line
writerow( out, ['Source:', net.getSource()] )
writerow( out, ['Date:', net.getDate()] )
writerow( out, ['Tool:', net.getTool()] )
writerow( out, ['Component Count:', len(net.components)] )
writerow( out, ['Component Count:', len(components)] )
writerow( out, ['Ref', 'Value', 'Footprint', 'Datasheet', 'Manufacturer', 'Vendor'] )

components = net.getInterestingComponents()

# Output all of the component information (One component per row)
for c in components:
    writerow( out, [c.getRef(), c.getValue(), c.getFootprint(), c.getDatasheet(),
+3 −3
Original line number Diff line number Diff line
@@ -77,12 +77,14 @@ except IOError:
    print(__file__, ":", e, file=sys.stderr)
    f = stdout

components = net.getInterestingComponents()

# Output a set of rows for a header providing general information
html = html.replace('<!--SOURCE-->', net.getSource())
html = html.replace('<!--DATE-->', net.getDate())
html = html.replace('<!--TOOL-->', net.getTool())
html = html.replace('<!--COMPCOUNT-->', "<b>Component Count:</b>" + \
    str(len(net.components)))
    str(len(components)))

row  = "<tr><th style='width:640px'>Ref</th>" + "<th>Qnty</th>"
row += "<th>Value</th>" + "<th>Part</th>"
@@ -92,8 +94,6 @@ row += "<th>PartNumber</th>" + "<th>Vendor</th></tr>"

html = html.replace('<!--TABLEROW-->', row + "<!--TABLEROW-->")

components = net.getInterestingComponents()

# Get all of the components in groups of matching parts + values
# (see kicad_netlist_reader.py)
grouped = net.groupComponents(components)
+3 −3
Original line number Diff line number Diff line
@@ -42,12 +42,14 @@ except IOError:
    print(__file__, ":", e, file=sys.stderr)
    f = stdout

components = net.getInterestingComponents()

# Output a set of rows for a header providing general information
html = html.replace('<!--SOURCE-->', net.getSource())
html = html.replace('<!--DATE-->', net.getDate())
html = html.replace('<!--TOOL-->', net.getTool())
html = html.replace('<!--COMPCOUNT-->', "<b>Component Count:</b>" + \
    str(len(net.components)))
    str(len(components)))

row = "<tr><th style='width:640px'>Ref</th>" + "<th>Qnty</th>"
row += "<th>Value</th>" + "<th>Part</th>" + "<th>Datasheet</th>"
@@ -55,8 +57,6 @@ row += "<th>Description</th>" + "<th>Vendor</th></tr>"

html = html.replace('<!--TABLEROW-->', row + "<!--TABLEROW-->")

components = net.getInterestingComponents()

# Get all of the components in groups of matching parts + values
# (see kicad_netlist_reader.py)
grouped = net.groupComponents(components)