Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
c36bc551
Commit
c36bc551
authored
Aug 05, 2010
by
Dick Hollenbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add *.xsl pluging, fix eeschema/plugins/CMakeLists.txt to install it.
parent
b9eca945
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
70 additions
and
4 deletions
+70
-4
CMakeLists.txt
eeschema/plugins/CMakeLists.txt
+9
-4
netlist_form_pads-pcb.xsl
eeschema/plugins/netlist_form_pads-pcb.xsl
+61
-0
No files found.
eeschema/plugins/CMakeLists.txt
View file @
c36bc551
...
@@ -2,8 +2,13 @@ if(UNIX)
...
@@ -2,8 +2,13 @@ if(UNIX)
add_definitions
(
-D__UNIX__
)
add_definitions
(
-D__UNIX__
)
endif
(
UNIX
)
endif
(
UNIX
)
add_executable
(
netlist_form_pads-pcb netlist_form_pads-pcb.cpp
)
# add_executable(netlist_form_pads-pcb netlist_form_pads-pcb.cpp)
# install(TARGETS netlist_form_pads-pcb DESTINATION ${KICAD_PLUGINS} COMPONENT binary)
install
(
TARGETS netlist_form_pads-pcb
# 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
}
DESTINATION
${
KICAD_PLUGINS
}
COMPONENT binary
)
COMPONENT binary
)
eeschema/plugins/netlist_form_pads-pcb.xsl
0 → 100644
View file @
c36bc551
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--XSL style sheet to EESCHEMA Generic Netlist Format to PADS netlist format
Copyright (C) 2010, SoftPLC Corporation.
GPL v2.
-->
<!DOCTYPE xsl:stylesheet [
<!ENTITY nl "
">
<!--new line CR, LF -->
]>
<xsl:stylesheet
version=
"1.0"
xmlns:xsl=
"http://www.w3.org/1999/XSL/Transform"
>
<xsl:output
method=
"text"
omit-xml-declaration=
"yes"
indent=
"no"
/>
<xsl:template
match=
"export"
>
<xsl:text>
*PADS-PCB*
&nl;
*PART*
&nl;
</xsl:text>
<xsl:apply-templates
select=
"components/comp"
/>
<xsl:text>
&nl;
*NET*
&nl;
</xsl:text>
<xsl:apply-templates
select=
"nets/net"
/>
</xsl:template>
<!-- for each component -->
<xsl:template
match=
"comp"
>
<xsl:value-of
select=
"@ref"
/>
<xsl:text>
</xsl:text>
<xsl:choose>
<xsl:when
test =
"footprint = ''"
>
<xsl:text>
unknown
</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates
select=
"footprint"
/>
</xsl:otherwise>
</xsl:choose>
<xsl:text>
&nl;
</xsl:text>
</xsl:template>
<!-- for each net -->
<xsl:template
match=
"net"
>
<xsl:text>
*SIGNAL*
</xsl:text>
<xsl:choose>
<xsl:when
test =
"@name != '' "
>
<xsl:value-of
select=
"@name"
/>
</xsl:when>
<xsl:otherwise>
<xsl:text>
N-
</xsl:text>
<xsl:value-of
select=
"@code"
/>
</xsl:otherwise>
</xsl:choose>
<xsl:text>
&nl;
</xsl:text>
<xsl:apply-templates
select=
"node"
/>
</xsl:template>
<!-- for each node -->
<xsl:template
match=
"node"
>
<xsl:text>
</xsl:text>
<xsl:value-of
select=
"@ref"
/>
<xsl:text>
.
</xsl:text>
<xsl:value-of
select=
"@pin"
/>
<xsl:text>
&nl;
</xsl:text>
</xsl:template>
</xsl:stylesheet>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment