diff --git a/scripts/bom-in-python/bom_csv_by_ref.py b/scripts/bom-in-python/bom_csv_by_ref.py index b651afac2a..046272dec4 100644 --- a/scripts/bom-in-python/bom_csv_by_ref.py +++ b/scripts/bom-in-python/bom_csv_by_ref.py @@ -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(), diff --git a/scripts/bom-in-python/bom_csv_by_ref_v2.py b/scripts/bom-in-python/bom_csv_by_ref_v2.py index 30c8faaabb..ccb303e097 100644 --- a/scripts/bom-in-python/bom_csv_by_ref_v2.py +++ b/scripts/bom-in-python/bom_csv_by_ref_v2.py @@ -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(), diff --git a/scripts/bom-in-python/bom_html_by_value.py b/scripts/bom-in-python/bom_html_by_value.py index 244248ad71..b4493f5fe4 100644 --- a/scripts/bom-in-python/bom_html_by_value.py +++ b/scripts/bom-in-python/bom_html_by_value.py @@ -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('', net.getSource()) html = html.replace('', net.getDate()) html = html.replace('', net.getTool()) html = html.replace('', "Component Count:" + \ - str(len(net.components))) + str(len(components))) row = "