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
#
"""
@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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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')

View File

@ -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

View File

@ -6,27 +6,17 @@
Generation of csv table with table head of all existing field names
and correct assigned cell entries
How to use this is explained in eeschema.pdf chapter 14. You enter a command line into the
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.
How to use this is explained in eeschema.pdf chapter 14.
-->
<!--
@package
Generate a Tab delimited list (csv file type).
One component per line
Fields are
Ref,Value, Footprint, Datasheet, Field5, Field4, price
Output: CSV (comma-separated)
Grouped By: ungrouped, one component per line
Sorted By: Ref
Fields: Reference, Value, Footprint, Datasheet, all additional symbol fields
Command line
Command line:
xsltproc -o "%O.csv" "pathToFile/bom2csv.xsl" "%I"
-->

View File

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

View File

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