Cleanup BOM script descriptions

- make descriptions consistent
- fix inaccuracies
- describe what scripts do more precisely
This commit is contained in:
Graham Keeth
2021-03-07 16:33:59 +00:00
committed by jean-pierre charras
parent 0fde536223
commit a0f57d6846
9 changed files with 53 additions and 64 deletions
@@ -3,12 +3,15 @@
#
# Example: Sorted and Grouped CSV BOM
#
"""
@package
Generate a csv BOM list.
Components are sorted by ref and grouped by value
Fields are (if exist)
Item, Qty, Reference(s), Value, LibPart, Footprint, Datasheet
Output: CSV (comma-separated)
Grouped By: Value
Sorted By: Ref
Fields: Item, Qty, Reference(s), Value, LibPart, Footprint, Datasheet, all additional symbol fields
Outputs ungrouped components first, then outputs grouped components.
Command line:
python "pathToFile/bom_csv_grouped_by_value.py" "%I" "%O.csv"
@@ -6,10 +6,10 @@
"""
@package
Generate a comma delimited list (csv file type).
Components are sorted by ref and grouped by value with same footprint
Fields are (if exist)
'Ref', 'Qnty', 'Value', 'Cmp name', 'Footprint', 'Description', 'Vendor'
Output: CSV (comma-separated)
Grouped By: Value, Footprint
Sorted By: Ref
Fields: Ref, Qnty, Value, Cmp name, Footprint, Description, Vendor
Command line:
python "pathToFile/bom_csv_grouped_by_value_with_fp.py" "%I" "%O.csv"
@@ -6,11 +6,10 @@
"""
@package
Generate a csv list file.
Components are sorted by ref
One component per line
Fields are (if exist)
Ref, value, Part, footprint, Datasheet, Manufacturer, Vendor
Output: CSV (comma-separated)
Grouped By: ungrouped, one component per line
Sorted By: Ref
Fields: Ref, Value, Part, Footprint, Datasheet, Manufacturer, Vendor
Command line:
python "pathToFile/bom_csv_sorted_by_ref.py" "%I" "%O.csv"
@@ -3,12 +3,13 @@
#
# Example: Sorted and Grouped HTML BOM
#
"""
@package
Generate a HTML BOM list.
Components are sorted by ref and grouped by value
Fields are (if exist)
Ref, Quantity, Value, Part, Datasheet, Description, Vendor
Output: HTML
Grouped By: Value
Sorted By: Ref
Fields: Ref, Qnty, Value, Part, Datasheet, Description, Vendor
Command line:
python "pathToFile/bom_html_grouped_by_value.py" "%I" "%O.html"
@@ -6,16 +6,15 @@
"""
@package
Generate a HTML BOM list.
Components are sorted and grouped by value
Fields are (if exist)
Ref, Quantity, Value, Part, Footprint, Description, Vendor
Output: HTML
Grouped By: Value, Part, Footprint, Tolerance, Manufacturer, Voltage
Sorted By: Ref
Fields: Ref, Qnty, Value, Part, Footprint, Description, Vendor
Command line:
python "pathToFile/bom_with_advanced_grouping.py" "%I" "%O.html"
"""
from __future__ import print_function
# Import the KiCad python helper module and the csv formatter
@@ -79,7 +78,7 @@ kicad_netlist_reader.comp.__eq__ = myEqu
# <file>.tmp. If the file doesn't exist, execution will stop
net = kicad_netlist_reader.netlist(sys.argv[1])
# Open a file to write too, if the file cannot be opened output to stdout
# Open a file to write to, if the file cannot be opened output to stdout
# instead
try:
f = open(sys.argv[2], 'w')
@@ -1,17 +1,16 @@
#
# Example python script to generate a BOM from a KiCad generic netlist
#
"""
@package
Generate a BOM list file (a simple text).
Components are sorted by ref
One component per line
Fields are (if exist)
Ref, Quantity, value, Part, footprint, Description, Vendor
Fields are separated by tabs
Output: text file (tab-separated)
Grouped By: ungrouped, one component per line
Sorted By: Ref
Fields: Ref, Value, Part, Footprint, Description, Vendor
Command line:
python "pathToFile/bom_sorted_by_ref.py" "%I" "%O.txt"
python "pathToFile/bom_txt_sorted_by_ref.py" "%I" "%O.txt"
"""
from __future__ import print_function