From 5da0a971d541471cb72c9435bbdcaf39d7d28a3a Mon Sep 17 00:00:00 2001 From: Stefan Helmert Date: Wed, 17 Apr 2013 09:57:47 -0500 Subject: [PATCH] The internal BOM generator has bugs. I designed an XSL script, which converts the generated XML Partlist into a CSV file for Libre Office or Open Office. It is very easy to use. You can specify it as a plugin for Eeshema netlist generator. It searches for all field names, generates the table headings accounting for all fields found in any part. Then stuffs all the parts rows according to proper fields. --- eeschema/plugins/CMakeLists.txt | 30 +++++++----- eeschema/plugins/bom2csv.xsl | 85 +++++++++++++++++++++++++++++++++ 2 files changed, 102 insertions(+), 13 deletions(-) create mode 100644 eeschema/plugins/bom2csv.xsl diff --git a/eeschema/plugins/CMakeLists.txt b/eeschema/plugins/CMakeLists.txt index 1dfbf6ebcd..ebc2aed1b4 100644 --- a/eeschema/plugins/CMakeLists.txt +++ b/eeschema/plugins/CMakeLists.txt @@ -1,14 +1,18 @@ -if(UNIX) - add_definitions(-D__UNIX__) -endif(UNIX) - -# add_executable(netlist_form_pads-pcb netlist_form_pads-pcb.cpp) -# install(TARGETS netlist_form_pads-pcb DESTINATION ${KICAD_PLUGINS} COMPONENT binary) - -# install the *.xsl file(s), user will need to install 'xsltproc' and setup +# Install the *.xsl file(s), user will need to install 'xsltproc' and setup # EESCHEMA's netlist plugins -install( FILES - netlist_form_pads-pcb.xsl - DESTINATION ${KICAD_PLUGINS} - COMPONENT binary - ) +# See chapter 14 of eeschema.pdf + + +set( xsl_lst + bom2csv.xsl + bom_cvs.xsl + netlist_form_cadstar-RINF.xsl + netlist_form_cadstar.xsl + netlist_form_OrcadPcb2.xsl + netlist_form_pads-pcb.xsl + ) + +install( FILES ${xsl_lst} + DESTINATION ${KICAD_PLUGINS} + COMPONENT binary + ) diff --git a/eeschema/plugins/bom2csv.xsl b/eeschema/plugins/bom2csv.xsl new file mode 100644 index 0000000000..3140609928 --- /dev/null +++ b/eeschema/plugins/bom2csv.xsl @@ -0,0 +1,85 @@ + + + +]> + + + + + + + + + + + Reference, Value, Footprint, Datasheet + + + + , + + + &nl; + + + + + + + + , + , + , + + + &nl; + + + + + + + + + + + + , + + + + + + + + + + + + + + +