pull/33/head
Conor 2016-04-23 23:47:29 -04:00
rodzic 72ba9f0b0b
commit 13740654e6
2 zmienionych plików z 110 dodań i 0 usunięć

Wyświetl plik

@ -0,0 +1,93 @@
<!--XSL style sheet to convert EESCHEMA XML Partlist Format to CSV BOM Format
Copyright (C) 2013, Stefan Helmert.
GPL v2.
Functionality:
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.
-->
<!--
@package
Generate a Tab delimited list (csv file type).
One component per line
Fields are
Ref,Value, Footprint, Datasheet, Field5, Field4, price
-->
<!DOCTYPE xsl:stylesheet [
<!ENTITY nl "&#xd;&#xa;"> <!--new line CR, LF, or LF, your choice -->
]>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="text"/>
<!-- for table head and empty table fields-->
<xsl:key name="headentr" match="field" use="@name"/>
<!-- main part -->
<xsl:template match="/export">
<xsl:text>Reference, Value, Footprint, Datasheet</xsl:text>
<!-- find all existing table head entries and list each one once -->
<xsl:for-each select="components/comp/fields/field[generate-id(.) = generate-id(key('headentr',@name)[1])]">
<xsl:text>, </xsl:text>
<xsl:value-of select="@name"/>
</xsl:for-each>
<xsl:text>&nl;</xsl:text>
<!-- all table entries -->
<xsl:apply-templates select="components/comp"/>
</xsl:template>
<!-- the table entries -->
<xsl:template match="components/comp">
<xsl:value-of select="@ref"/><xsl:text>,</xsl:text>
<xsl:value-of select="value"/><xsl:text>,</xsl:text>
<xsl:value-of select="footprint"/><xsl:text>,</xsl:text>
<xsl:value-of select="datasheet"/>
<xsl:apply-templates select="fields"/>
<xsl:text>&nl;</xsl:text>
</xsl:template>
<!-- table entries with dynamic table head -->
<xsl:template match="fields">
<!-- remember current fields section -->
<xsl:variable name="fieldvar" select="field"/>
<!-- for all existing head entries -->
<xsl:for-each select="/export/components/comp/fields/field[generate-id(.) = generate-id(key('headentr',@name)[1])]">
<xsl:variable name="allnames" select="@name"/>
<xsl:text>,</xsl:text>
<!-- for all field entries in the remembered fields section -->
<xsl:for-each select="$fieldvar">
<!-- only if this field entry exists in this fields section -->
<xsl:if test="@name=$allnames">
<!-- content of the field -->
<xsl:value-of select="."/>
</xsl:if>
<!--
If it does not exist, use an empty cell in output for this row.
Every non-blank entry is assigned to its proper column.
-->
</xsl:for-each>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>

Wyświetl plik

@ -0,0 +1,17 @@
Reference, Value, Footprint, Datasheet, MFG Name, MFG Part Num, Distributer PN, Distributer Link
A1,ATECC508A,Housings_SOIC:SOIC-8_3.9x4.9mm_Pitch1.27mm,http://www.atmel.com/Images/Atmel-8923S-CryptoAuth-ATECC508A-Datasheet-Summary.pdf,Atmel,ATECC508A-SSHDA-B,ATECC508A-SSHDA-B-ND,http://www.digikey.com/product-detail/en/atmel/ATECC508A-SSHDA-B/ATECC508A-SSHDA-B-ND/5213053
C3,0.1uF,Capacitors_SMD:C_0402,http://media.digikey.com/pdf/Data%20Sheets/Samsung%20PDFs/CL_Series_MLCC_ds.pdf,Samsung Electro-Mechanics America, Inc,CL05A104MP5NNNC,1276-1443-1-ND,http://www.digikey.com/product-detail/en/CL05A104MP5NNNC/1276-1443-1-ND/3889529
C4,4.7uF,Capacitors_SMD:C_0603,http://media.digikey.com/pdf/Data%20Sheets/Samsung%20PDFs/CL_Series_MLCC_ds.pdf,Samsung Electro-Mechanics America, Inc,CL10B475KQ8NQNC,1276-2087-1-ND,http://www.digikey.com/product-detail/en/CL10B475KQ8NQNC/1276-2087-1-ND/3890173
Z1,DF5A5.6JE,TO_SOT_Packages_SMD:SOT-553,http://optoelectronics.liteon.com/upload/download/DS22-2008-0044/S_110_LTST-C19HE1WT.pdf,Toshiba Semiconductor and Storage,DF5A5.6JE,LM,DF5A5.6JELMCT-ND,http://www.digikey.com/product-detail/en/DF5A5.6JE,LM/DF5A5.6JELMCT-ND/5403466
R1,100,Resistors_SMD:R_0603,http://www.vishay.com/docs/20035/dcrcwe3.pdf,Vishay Dale,CRCW0603100RFKEA,541-100HCT-ND,http://www.digikey.com/product-detail/en/CRCW0603100RFKEA/541-100HCT-ND/1179695
RGB1,CA_RGB,footprints:LED-0606,http://optoelectronics.liteon.com/upload/download/DS22-2008-0044/S_110_LTST-C19HE1WT.pdf,Lite-On Inc,LTST-C19HE1WT,160-2162-1-ND,http://www.digikey.com/product-detail/en/LTST-C19HE1WT/160-2162-1-ND/4866310
SW1,SW_PUSH,footprints:u2f-button,http://www.digikey.com/product-detail/en/e-switch/TL3305AF260QG/EG5353CT-ND/5816198,E-Switch,TL3305AF260QG,EG5353CT-ND,http://www.digikey.com/product-detail/en/e-switch/TL3305AF260QG/EG5353CT-ND/5816198
TX1,debug-pin,footprints:debug,
RX1,debug-pin,footprints:debug,
C2CK1,debug-pin,footprints:debug,
C2D1,debug-pin,footprints:debug,
E0,EFM8UB1_24pin,footprints:QSOP-24_3.9x8.7mm_Pitch0.635mm_fat,https://www.silabs.com/Support%20Documents/TechnicalDocs/EFM8UB1_DataSheet.pdf,Silicon Labs,EFM8UB11F16G-C-QSOP24,r 336-3411-5-ND,http://www.digikey.com/product-detail/en/silicon-labs/EFM8UB11F16G-C-QSOP24/336-3411-5-ND/5592439
GND1,debug-pin,footprints:debug,
F1,u2f-fiducial,footprints:u2f-fiducial,
F2,u2f-fiducial,footprints:u2f-fiducial,
F3,u2f-fiducial,footprints:u2f-fiducial,
Nie można renderować tego pliku, ponieważ ma nieprawidłową liczbę pól w wierszu 13.