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

View File

@ -3,12 +3,15 @@
# #
# Example: Sorted and Grouped CSV BOM # Example: Sorted and Grouped CSV BOM
# #
""" """
@package @package
Generate a csv BOM list. Output: CSV (comma-separated)
Components are sorted by ref and grouped by value Grouped By: Value
Fields are (if exist) Sorted By: Ref
Item, Qty, Reference(s), Value, LibPart, Footprint, Datasheet Fields: Item, Qty, Reference(s), Value, LibPart, Footprint, Datasheet, all additional symbol fields
Outputs ungrouped components first, then outputs grouped components.
Command line: Command line:
python "pathToFile/bom_csv_grouped_by_value.py" "%I" "%O.csv" python "pathToFile/bom_csv_grouped_by_value.py" "%I" "%O.csv"

View File

@ -6,10 +6,10 @@
""" """
@package @package
Generate a comma delimited list (csv file type). Output: CSV (comma-separated)
Components are sorted by ref and grouped by value with same footprint Grouped By: Value, Footprint
Fields are (if exist) Sorted By: Ref
'Ref', 'Qnty', 'Value', 'Cmp name', 'Footprint', 'Description', 'Vendor' Fields: Ref, Qnty, Value, Cmp name, Footprint, Description, Vendor
Command line: Command line:
python "pathToFile/bom_csv_grouped_by_value_with_fp.py" "%I" "%O.csv" python "pathToFile/bom_csv_grouped_by_value_with_fp.py" "%I" "%O.csv"

View File

@ -6,11 +6,10 @@
""" """
@package @package
Generate a csv list file. Output: CSV (comma-separated)
Components are sorted by ref Grouped By: ungrouped, one component per line
One component per line Sorted By: Ref
Fields are (if exist) Fields: Ref, Value, Part, Footprint, Datasheet, Manufacturer, Vendor
Ref, value, Part, footprint, Datasheet, Manufacturer, Vendor
Command line: Command line:
python "pathToFile/bom_csv_sorted_by_ref.py" "%I" "%O.csv" python "pathToFile/bom_csv_sorted_by_ref.py" "%I" "%O.csv"

View File

@ -3,12 +3,13 @@
# #
# Example: Sorted and Grouped HTML BOM # Example: Sorted and Grouped HTML BOM
# #
""" """
@package @package
Generate a HTML BOM list. Output: HTML
Components are sorted by ref and grouped by value Grouped By: Value
Fields are (if exist) Sorted By: Ref
Ref, Quantity, Value, Part, Datasheet, Description, Vendor Fields: Ref, Qnty, Value, Part, Datasheet, Description, Vendor
Command line: Command line:
python "pathToFile/bom_html_grouped_by_value.py" "%I" "%O.html" python "pathToFile/bom_html_grouped_by_value.py" "%I" "%O.html"

View File

@ -6,16 +6,15 @@
""" """
@package @package
Generate a HTML BOM list. Output: HTML
Components are sorted and grouped by value Grouped By: Value, Part, Footprint, Tolerance, Manufacturer, Voltage
Fields are (if exist) Sorted By: Ref
Ref, Quantity, Value, Part, Footprint, Description, Vendor Fields: Ref, Qnty, Value, Part, Footprint, Description, Vendor
Command line: Command line:
python "pathToFile/bom_with_advanced_grouping.py" "%I" "%O.html" python "pathToFile/bom_with_advanced_grouping.py" "%I" "%O.html"
""" """
from __future__ import print_function from __future__ import print_function
# Import the KiCad python helper module and the csv formatter # 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 # <file>.tmp. If the file doesn't exist, execution will stop
net = kicad_netlist_reader.netlist(sys.argv[1]) 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 # instead
try: try:
f = open(sys.argv[2], 'w') f = open(sys.argv[2], 'w')

View File

@ -1,17 +1,16 @@
# #
# Example python script to generate a BOM from a KiCad generic netlist # Example python script to generate a BOM from a KiCad generic netlist
# #
""" """
@package @package
Generate a BOM list file (a simple text). Output: text file (tab-separated)
Components are sorted by ref Grouped By: ungrouped, one component per line
One component per line Sorted By: Ref
Fields are (if exist) Fields: Ref, Value, Part, Footprint, Description, Vendor
Ref, Quantity, value, Part, footprint, Description, Vendor
Fields are separated by tabs
Command line: 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 from __future__ import print_function

View File

@ -6,27 +6,17 @@
Generation of csv table with table head of all existing field names Generation of csv table with table head of all existing field names
and correct assigned cell entries and correct assigned cell entries
How to use this is explained in eeschema.pdf chapter 14. You enter a command line into the How to use this is explained in eeschema.pdf chapter 14.
netlist exporter using a new (custom) tab in the netlist export dialog. The command is
similar to
on Windows:
xsltproc -o "%O.csv" "C:\Program Files (x86)\KiCad\bin\plugins\bom2csv.xsl" "%I"
on Linux:
xsltproc -o "%O.csv" /usr/local/lib/kicad/plugins/bom2csv.xsl "%I"
Instead of "%O.csv" you can alternatively use "%O" if you will supply your own file extension when
prompted in the UI. The double quotes are there to account for the possibility of space(s)
in the filename.
--> -->
<!-- <!--
@package @package
Generate a Tab delimited list (csv file type). Output: CSV (comma-separated)
One component per line Grouped By: ungrouped, one component per line
Fields are Sorted By: Ref
Ref,Value, Footprint, Datasheet, Field5, Field4, price Fields: Reference, Value, Footprint, Datasheet, all additional symbol fields
Command line Command line:
xsltproc -o "%O.csv" "pathToFile/bom2csv.xsl" "%I" xsltproc -o "%O.csv" "pathToFile/bom2csv.xsl" "%I"
--> -->

View File

@ -7,22 +7,17 @@
Functionality: Functionality:
Generation of Digi-Key ordering system compatible BOM Generation of Digi-Key ordering system compatible BOM
How to use this is explained in eeschema.pdf chapter 14. You enter a command line into the How to use this is explained in eeschema.pdf chapter 14.
netlist exporter using a new (custom) tab in the netlist export dialog.
The command line is
xsltproc -o "%O.csv" "FullPathToFile/bom2groupedCsv.xsl" "%I"
--> -->
<!-- <!--
@package @package
Functionality: Output: CSV (comma-separated)
* Generate a comma separated value BOM list (csv file type). Grouped By: Value, Footprint
* Components are sorted by ref and grouped by same value+footprint Sorted By: Ref
One value per line Fields: Reference, Quantity, Value, Footprint, Datasheet, all additional symbol fields
Fields are
Reference, Quantity, Value, Footprint, Datasheet
The command line is Command line:
xsltproc -o "%O.csv" "FullPathToFile/bom2groupedCsv.xsl" "%I" xsltproc -o "%O.csv" "pathToFile/bom2grouped_csv.xsl" "%I"
--> -->

View File

@ -24,12 +24,15 @@
--> -->
<!-- <!--
@package @package
Output format Output: CSV (comma-separated)
Reference, Value, Fields[n], Library, Library Ref Grouped By: ungrouped, one component per line
U1, PIC32MX, Fields[n], KicadLib, PIC Sorted By: Ref
Fields: Reference, Value, any additional symbol fields, Library, Library Ref
Command line: Includes a title block at the top of the BOM.
xsltproc -o "%O.csv" "pathToFile/bom2csv.xsl" "%I"
Command line:
xsltproc -o "%O.csv" "pathToFile/bom_with_title_block_2_csv.xsl" "%I"
--> -->
<!DOCTYPE xsl:stylesheet [ <!DOCTYPE xsl:stylesheet [