diff --git a/eeschema/plugins/CMakeLists.txt b/eeschema/plugins/CMakeLists.txt index 8fbed3c3cb..5cf34d8771 100644 --- a/eeschema/plugins/CMakeLists.txt +++ b/eeschema/plugins/CMakeLists.txt @@ -3,17 +3,28 @@ # See chapter 14 of eeschema.pdf -set( xsl_lst - bom2csv.xsl - bom2grouped_csv.xsl - netlist_form_cadstar-RINF.xsl - netlist_form_cadstar.xsl - netlist_form_OrcadPcb2.xsl - netlist_form_pads-pcb.xsl - bom_with_title_block_2_csv.xsl +set( XSL_SCRIPTS_LIST + xsl_scripts/bom2csv.xsl + xsl_scripts/bom2grouped_csv.xsl + xsl_scripts/netlist_form_cadstar-RINF.xsl + xsl_scripts/netlist_form_cadstar.xsl + xsl_scripts/netlist_form_OrcadPcb2.xsl + xsl_scripts/netlist_form_pads-pcb.xsl + xsl_scripts/bom_with_title_block_2_csv.xsl ) -install( FILES ${xsl_lst} +set( PYTHON_SCRIPTS_LIST + python_scripts/README-bom.txt + python_scripts/kicad_netlist_reader.py + python_scripts/bom_csv_grouped_by_value.py + python_scripts/bom_csv_grouped_by_value_with_fp.py + python_scripts/bom_csv_sorted_by_ref.py + python_scripts/bom_html_grouped_by_value.py + python_scripts/bom_html_with_advanced_grouping.py + python_scripts/bom_sorted_by_ref.py + ) + +install( FILES ${XSL_SCRIPTS_LIST} ${PYTHON_SCRIPTS_LIST} DESTINATION ${KICAD_PLUGINS} COMPONENT binary ) diff --git a/scripts/bom-in-python/README-bom.txt b/eeschema/plugins/python_scripts/README-bom.txt similarity index 100% rename from scripts/bom-in-python/README-bom.txt rename to eeschema/plugins/python_scripts/README-bom.txt diff --git a/scripts/bom-in-python/bom_csv_grouped_by_value.py b/eeschema/plugins/python_scripts/bom_csv_grouped_by_value.py similarity index 100% rename from scripts/bom-in-python/bom_csv_grouped_by_value.py rename to eeschema/plugins/python_scripts/bom_csv_grouped_by_value.py diff --git a/scripts/bom-in-python/bom_csv_grouped_by_value_with_fp.py b/eeschema/plugins/python_scripts/bom_csv_grouped_by_value_with_fp.py similarity index 100% rename from scripts/bom-in-python/bom_csv_grouped_by_value_with_fp.py rename to eeschema/plugins/python_scripts/bom_csv_grouped_by_value_with_fp.py diff --git a/scripts/bom-in-python/bom_csv_sorted_by_ref.py b/eeschema/plugins/python_scripts/bom_csv_sorted_by_ref.py similarity index 100% rename from scripts/bom-in-python/bom_csv_sorted_by_ref.py rename to eeschema/plugins/python_scripts/bom_csv_sorted_by_ref.py diff --git a/scripts/bom-in-python/bom_html_grouped_by_value.py b/eeschema/plugins/python_scripts/bom_html_grouped_by_value.py similarity index 97% rename from scripts/bom-in-python/bom_html_grouped_by_value.py rename to eeschema/plugins/python_scripts/bom_html_grouped_by_value.py index 59321dc9e3..80def66453 100644 --- a/scripts/bom-in-python/bom_html_grouped_by_value.py +++ b/eeschema/plugins/python_scripts/bom_html_grouped_by_value.py @@ -11,7 +11,7 @@ Ref, Quantity, Value, Part, Datasheet, Description, Vendor Command line: - python "pathToFile/bom_html_grouped_by_value.py" "%I" "%O.csv" + python "pathToFile/bom_html_grouped_by_value.py" "%I" "%O.html" """ from __future__ import print_function diff --git a/scripts/bom-in-python/bom_html_with_advanced_grouping.py b/eeschema/plugins/python_scripts/bom_html_with_advanced_grouping.py similarity index 98% rename from scripts/bom-in-python/bom_html_with_advanced_grouping.py rename to eeschema/plugins/python_scripts/bom_html_with_advanced_grouping.py index 47589aadab..a091351509 100644 --- a/scripts/bom-in-python/bom_html_with_advanced_grouping.py +++ b/eeschema/plugins/python_scripts/bom_html_with_advanced_grouping.py @@ -12,7 +12,7 @@ Ref, Quantity, Value, Part, Footprint, Description, Vendor Command line: - python "pathToFile/bom_with_advanced_grouping.py" "%I" "%O.csv" + python "pathToFile/bom_with_advanced_grouping.py" "%I" "%O.html" """ diff --git a/scripts/bom-in-python/bom_sorted_by_ref.py b/eeschema/plugins/python_scripts/bom_sorted_by_ref.py similarity index 97% rename from scripts/bom-in-python/bom_sorted_by_ref.py rename to eeschema/plugins/python_scripts/bom_sorted_by_ref.py index eb3f33fbdb..6dd28d5743 100644 --- a/scripts/bom-in-python/bom_sorted_by_ref.py +++ b/eeschema/plugins/python_scripts/bom_sorted_by_ref.py @@ -11,7 +11,7 @@ Fields are separated by tabs Command line: - python "pathToFile/bom_sorted_by_ref.py" "%I" "%O.csv" + python "pathToFile/bom_sorted_by_ref.py" "%I" "%O.txt" """ from __future__ import print_function diff --git a/scripts/bom-in-python/kicad_netlist_reader.py b/eeschema/plugins/python_scripts/kicad_netlist_reader.py similarity index 100% rename from scripts/bom-in-python/kicad_netlist_reader.py rename to eeschema/plugins/python_scripts/kicad_netlist_reader.py diff --git a/scripts/bom-in-python/round_robin.py b/eeschema/plugins/python_scripts/round_robin.py similarity index 100% rename from scripts/bom-in-python/round_robin.py rename to eeschema/plugins/python_scripts/round_robin.py diff --git a/scripts/bom-in-python/round_value_robin.py b/eeschema/plugins/python_scripts/round_value_robin.py similarity index 100% rename from scripts/bom-in-python/round_value_robin.py rename to eeschema/plugins/python_scripts/round_value_robin.py diff --git a/eeschema/plugins/bom2csv.xsl b/eeschema/plugins/xsl_scripts/bom2csv.xsl similarity index 100% rename from eeschema/plugins/bom2csv.xsl rename to eeschema/plugins/xsl_scripts/bom2csv.xsl diff --git a/eeschema/plugins/bom2grouped_csv.xsl b/eeschema/plugins/xsl_scripts/bom2grouped_csv.xsl similarity index 100% rename from eeschema/plugins/bom2grouped_csv.xsl rename to eeschema/plugins/xsl_scripts/bom2grouped_csv.xsl diff --git a/eeschema/plugins/bom_with_title_block_2_csv.xsl b/eeschema/plugins/xsl_scripts/bom_with_title_block_2_csv.xsl similarity index 100% rename from eeschema/plugins/bom_with_title_block_2_csv.xsl rename to eeschema/plugins/xsl_scripts/bom_with_title_block_2_csv.xsl diff --git a/eeschema/plugins/netlist_form_OrcadPcb2.xsl b/eeschema/plugins/xsl_scripts/netlist_form_OrcadPcb2.xsl similarity index 100% rename from eeschema/plugins/netlist_form_OrcadPcb2.xsl rename to eeschema/plugins/xsl_scripts/netlist_form_OrcadPcb2.xsl diff --git a/eeschema/plugins/netlist_form_cadstar-RINF.xsl b/eeschema/plugins/xsl_scripts/netlist_form_cadstar-RINF.xsl similarity index 100% rename from eeschema/plugins/netlist_form_cadstar-RINF.xsl rename to eeschema/plugins/xsl_scripts/netlist_form_cadstar-RINF.xsl diff --git a/eeschema/plugins/netlist_form_cadstar.xsl b/eeschema/plugins/xsl_scripts/netlist_form_cadstar.xsl similarity index 100% rename from eeschema/plugins/netlist_form_cadstar.xsl rename to eeschema/plugins/xsl_scripts/netlist_form_cadstar.xsl diff --git a/eeschema/plugins/netlist_form_pads-pcb.xsl b/eeschema/plugins/xsl_scripts/netlist_form_pads-pcb.xsl similarity index 100% rename from eeschema/plugins/netlist_form_pads-pcb.xsl rename to eeschema/plugins/xsl_scripts/netlist_form_pads-pcb.xsl diff --git a/scripts/bom-in-python/bom_html_by_value.py b/scripts/bom-in-python/bom_html_by_value.py deleted file mode 100644 index f77437ced8..0000000000 --- a/scripts/bom-in-python/bom_html_by_value.py +++ /dev/null @@ -1,143 +0,0 @@ -# -# Example python script to generate a BOM from a KiCad generic netlist -# -# Example: Sorted and Grouped HTML BOM with more advanced grouping -# - -""" - @package - Generate a HTML BOM list. - Components are sorted and grouped by ref - Fields are (if exist) - Ref, Quantity, Value, Symbol, footprint, Description, Vendor - - Command line: - python "pathToFile/bom_html_by_value.py" "%I" "%O.csv" -""" - - -from __future__ import print_function - -# Import the KiCad python helper module and the csv formatter -import kicad_netlist_reader -import sys - -# Start with a basic html template -html = """ - - -
- -