franta-hg@60
|
1 |
<?xml version="1.0" encoding="UTF-8"?>
|
franta-hg@60
|
2 |
<!--
|
franta-hg@60
|
3 |
XML Web generátor – program na generování webových stránek
|
franta-hg@60
|
4 |
Copyright © 2012 František Kučera (frantovo.cz)
|
franta-hg@60
|
5 |
|
franta-hg@60
|
6 |
This program is free software: you can redistribute it and/or modify
|
franta-hg@60
|
7 |
it under the terms of the GNU General Public License as published by
|
franta-hg@60
|
8 |
the Free Software Foundation, either version 3 of the License, or
|
franta-hg@60
|
9 |
(at your option) any later version.
|
franta-hg@60
|
10 |
|
franta-hg@60
|
11 |
This program is distributed in the hope that it will be useful,
|
franta-hg@60
|
12 |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
franta-hg@60
|
13 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
franta-hg@60
|
14 |
GNU General Public License for more details.
|
franta-hg@60
|
15 |
|
franta-hg@60
|
16 |
You should have received a copy of the GNU General Public License
|
franta-hg@60
|
17 |
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
franta-hg@60
|
18 |
-->
|
franta-hg@1
|
19 |
<project name="xhtml-web" basedir="." default="generuj">
|
franta-hg@1
|
20 |
|
franta-hg@123
|
21 |
<loadproperties srcfile="build.uživatelské.properties"/>
|
franta-hg@123
|
22 |
<loadproperties srcfile="build.properties"/>
|
franta-hg@123
|
23 |
|
franta-hg@2
|
24 |
<!-- Používané adresáře – např. zde můžete vstup a výstup nasměrovat do jiného verzovaného úložiště -->
|
franta-hg@1
|
25 |
<property name="vstup" value="vstup"/>
|
franta-hg@1
|
26 |
<property name="výstup" value="výstup"/>
|
franta-hg@1
|
27 |
<property name="šablona" value="šablona"/>
|
franta-hg@51
|
28 |
<property name="seznamMaker" value="${šablona}/.makra-seznam.xsl"/>
|
franta-hg@1
|
29 |
<property name="temp" value="temp"/>
|
franta-hg@2
|
30 |
<property name="funkce" value="${šablona}/funkce/build/classes"/>
|
franta-hg@60
|
31 |
<property name="čára" value="----------------------------------------------------------------"/>
|
franta-hg@87
|
32 |
|
franta-hg@15
|
33 |
<property name="vstupníPřípona" value=".xml"/>
|
franta-hg@15
|
34 |
<property name="výstupníPřípona" value=".xhtml"/>
|
franta-hg@87
|
35 |
|
franta-hg@130
|
36 |
<target name="generuj" description="Vygeneruje kompletní web." depends="licence,_připrav,agregace,stránky"/>
|
franta-hg@87
|
37 |
|
franta-hg@87
|
38 |
<target name="stránky" description="Vygeneruje samotné XHTML webové stránky." depends="statický-obsah,syntaxe,kompiluj-funkce,makra">
|
franta-hg@20
|
39 |
<xslt basedir="${vstup}" destdir="${výstup}" includes="*${vstupníPřípona}" extension="${výstupníPřípona}" style="${šablona}/stránka.xsl" processor="org.apache.tools.ant.taskdefs.optional.TraXLiaison">
|
franta-hg@131
|
40 |
<param name="podporaZaostalýchProhlížečů" expression="${xml.zaostaleProhlizece}"/>
|
franta-hg@15
|
41 |
<param name="vstupníPřípona" expression="${vstupníPřípona}"/>
|
franta-hg@15
|
42 |
<param name="výstupníPřípona" expression="${výstupníPřípona}"/>
|
franta-hg@123
|
43 |
<classpath location="${xslt.jar}"/>
|
franta-hg@6
|
44 |
<classpath location="${funkce}"/>
|
franta-hg@6
|
45 |
<factory name="net.sf.saxon.TransformerFactoryImpl">
|
franta-hg@121
|
46 |
<attribute name="http://saxon.sf.net/feature/allow-external-functions" value="true"/>
|
franta-hg@2
|
47 |
</factory>
|
franta-hg@2
|
48 |
</xslt>
|
franta-hg@1
|
49 |
</target>
|
franta-hg@87
|
50 |
|
franta-hg@31
|
51 |
<target name="syntaxe" description="Vygeneruje CSS styl pro zvýrazňování syntaxe" depends="kompiluj-funkce">
|
franta-hg@31
|
52 |
<xslt in="${vstup}/web.conf" out="${výstup}/css/syntaxe.css" style="${šablona}/syntaxe.xsl" processor="org.apache.tools.ant.taskdefs.optional.TraXLiaison">
|
franta-hg@123
|
53 |
<classpath location="${xslt.jar}"/>
|
franta-hg@31
|
54 |
<classpath location="${funkce}"/>
|
franta-hg@31
|
55 |
<factory name="net.sf.saxon.TransformerFactoryImpl">
|
franta-hg@87
|
56 |
<attribute name="http://saxon.sf.net/feature/allow-external-functions" value="true"/>
|
franta-hg@31
|
57 |
</factory>
|
franta-hg@31
|
58 |
</xslt>
|
franta-hg@31
|
59 |
</target>
|
franta-hg@87
|
60 |
|
franta-hg@51
|
61 |
<target name="makra" description="Vygeneruje seznam maker podle souborů v příslušných složkách" depends="kompiluj-funkce">
|
franta-hg@51
|
62 |
<xslt in="${vstup}/web.conf" out="${seznamMaker}" style="${šablona}/makra.xsl" processor="org.apache.tools.ant.taskdefs.optional.TraXLiaison">
|
franta-hg@123
|
63 |
<classpath location="${xslt.jar}"/>
|
franta-hg@51
|
64 |
<classpath location="${funkce}"/>
|
franta-hg@51
|
65 |
<factory name="net.sf.saxon.TransformerFactoryImpl">
|
franta-hg@121
|
66 |
<attribute name="http://saxon.sf.net/feature/allow-external-functions" value="true"/>
|
franta-hg@51
|
67 |
</factory>
|
franta-hg@51
|
68 |
</xslt>
|
franta-hg@51
|
69 |
</target>
|
franta-hg@87
|
70 |
|
franta-hg@22
|
71 |
<target name="agregace" description="Vytvoří agregované výstupy: RSS, Atom, Sitemap.xml." depends="kompiluj-funkce">
|
franta-hg@9
|
72 |
<!-- TODO: sloučit, zjednodušit, parametrizovat -->
|
franta-hg@87
|
73 |
|
franta-hg@7
|
74 |
<!-- Atom -->
|
franta-hg@20
|
75 |
<xslt in="${vstup}/web.conf" out="${výstup}/atom.xml" style="${šablona}/atom.xsl" processor="org.apache.tools.ant.taskdefs.optional.TraXLiaison">
|
franta-hg@15
|
76 |
<param name="vstupníPřípona" expression="${vstupníPřípona}"/>
|
franta-hg@15
|
77 |
<param name="výstupníPřípona" expression="${výstupníPřípona}"/>
|
franta-hg@123
|
78 |
<classpath location="${xslt.jar}"/>
|
franta-hg@9
|
79 |
<classpath location="${funkce}"/>
|
franta-hg@6
|
80 |
<factory name="net.sf.saxon.TransformerFactoryImpl">
|
franta-hg@121
|
81 |
<attribute name="http://saxon.sf.net/feature/allow-external-functions" value="true"/>
|
franta-hg@6
|
82 |
</factory>
|
franta-hg@7
|
83 |
</xslt>
|
franta-hg@87
|
84 |
|
franta-hg@121
|
85 |
<!-- RSS -->
|
franta-hg@87
|
86 |
<xslt in="${výstup}/atom.xml" out="${výstup}/rss.xml" style="${šablona}/rss.xsl" processor="org.apache.tools.ant.taskdefs.optional.TraXLiaison">
|
franta-hg@123
|
87 |
<classpath location="${xslt.jar}"/>
|
franta-hg@9
|
88 |
<classpath location="${funkce}"/>
|
franta-hg@8
|
89 |
<factory name="net.sf.saxon.TransformerFactoryImpl">
|
franta-hg@87
|
90 |
<attribute name="http://saxon.sf.net/feature/allow-external-functions" value="true"/>
|
franta-hg@8
|
91 |
</factory>
|
franta-hg@8
|
92 |
</xslt>
|
franta-hg@87
|
93 |
|
franta-hg@15
|
94 |
<!-- Sitemap.xml -->
|
franta-hg@121
|
95 |
<xslt in="${výstup}/atom.xml" out="${výstup}/sitemap.xml" style="${šablona}/sitemap.xsl" processor="org.apache.tools.ant.taskdefs.optional.TraXLiaison">
|
franta-hg@123
|
96 |
<classpath location="${xslt.jar}"/>
|
franta-hg@9
|
97 |
<classpath location="${funkce}"/>
|
franta-hg@9
|
98 |
<factory name="net.sf.saxon.TransformerFactoryImpl">
|
franta-hg@87
|
99 |
<attribute name="http://saxon.sf.net/feature/allow-external-functions" value="true"/>
|
franta-hg@9
|
100 |
</factory>
|
franta-hg@9
|
101 |
</xslt>
|
franta-hg@87
|
102 |
|
franta-hg@121
|
103 |
<!-- Seznam stránek -->
|
franta-hg@121
|
104 |
<xslt in="${výstup}/atom.xml" out="${vstup}/.seznam.xml" style="${šablona}/seznam.xsl" processor="org.apache.tools.ant.taskdefs.optional.TraXLiaison">
|
franta-hg@123
|
105 |
<classpath location="${xslt.jar}"/>
|
franta-hg@24
|
106 |
<classpath location="${funkce}"/>
|
franta-hg@24
|
107 |
<factory name="net.sf.saxon.TransformerFactoryImpl">
|
franta-hg@87
|
108 |
<attribute name="http://saxon.sf.net/feature/allow-external-functions" value="true"/>
|
franta-hg@24
|
109 |
</factory>
|
franta-hg@24
|
110 |
</xslt>
|
franta-hg@87
|
111 |
|
franta-hg@6
|
112 |
</target>
|
franta-hg@87
|
113 |
|
franta-hg@87
|
114 |
<target name="kompiluj-funkce" description="Přeloží funkce napsané v Javě.">
|
franta-hg@6
|
115 |
<mkdir dir="${funkce}"/>
|
franta-hg@6
|
116 |
<javac
|
franta-hg@6
|
117 |
srcdir="${šablona}/funkce/src"
|
franta-hg@87
|
118 |
destdir="${funkce}"
|
franta-hg@6
|
119 |
includeAntRuntime="no">
|
franta-hg@6
|
120 |
</javac>
|
franta-hg@6
|
121 |
</target>
|
franta-hg@87
|
122 |
|
franta-hg@11
|
123 |
<target name="statický-obsah" description="Kopíruje JS, CSS, obrázky atd.">
|
franta-hg@11
|
124 |
<copy todir="${výstup}">
|
franta-hg@78
|
125 |
<fileset dir="${vstup}" excludes="*.xml,makra/**,*.inc,web.conf"/>
|
franta-hg@11
|
126 |
</copy>
|
franta-hg@11
|
127 |
</target>
|
franta-hg@87
|
128 |
|
franta-hg@11
|
129 |
<target name="čisti" description="Smaže vygenerovaný obsah.">
|
franta-hg@11
|
130 |
<delete includeemptydirs="true">
|
franta-hg@11
|
131 |
<fileset dir="${výstup}" includes="**/*"/>
|
franta-hg@11
|
132 |
<fileset dir="${funkce}" includes="**/*"/>
|
franta-hg@51
|
133 |
<fileset file="${seznamMaker}"/>
|
franta-hg@11
|
134 |
</delete>
|
franta-hg@11
|
135 |
</target>
|
franta-hg@87
|
136 |
|
franta-hg@64
|
137 |
<target name="prohlédni" description="Otevře vygenerované stránky ve www prohlížeči.">
|
franta-hg@64
|
138 |
<exec executable="x-www-browser" os="Linux">
|
franta-hg@64
|
139 |
<arg value="${výstup}/index${výstupníPřípona}"/>
|
franta-hg@64
|
140 |
</exec>
|
franta-hg@64
|
141 |
</target>
|
franta-hg@82
|
142 |
|
franta-hg@129
|
143 |
<target name="publikuj" description="Nahraje výstup na server pomocí uživatelského skriptu.">
|
franta-hg@129
|
144 |
<exec executable="skripty/_publikuj.sh" os="Linux"/>
|
franta-hg@129
|
145 |
</target>
|
franta-hg@130
|
146 |
|
franta-hg@130
|
147 |
<target name="_připrav" description="Spustí volitelný skript před generováním.">
|
franta-hg@130
|
148 |
<exec executable="skripty/_připrav.sh" os="Linux"/>
|
franta-hg@130
|
149 |
</target>
|
franta-hg@129
|
150 |
|
franta-hg@82
|
151 |
<target name="dokumentace" description="Sestaví dokumentaci">
|
franta-hg@82
|
152 |
<javadoc destdir="dokumentace/javadoc" linksource="true" windowtitle="XML Web generátor – javadoc">
|
franta-hg@82
|
153 |
<fileset dir="šablona/funkce/src"/>
|
franta-hg@82
|
154 |
</javadoc>
|
franta-hg@82
|
155 |
</target>
|
franta-hg@87
|
156 |
|
franta-hg@60
|
157 |
<target name="licence">
|
franta-hg@60
|
158 |
<echo>${čára}
|
franta-hg@60
|
159 |
XML Web generátor Copyright © 2012 František Kučera (frantovo.cz)
|
franta-hg@60
|
160 |
This program comes with ABSOLUTELY NO WARRANTY;
|
franta-hg@60
|
161 |
This is free software, and you are welcome to redistribute it
|
franta-hg@60
|
162 |
under certain conditions; type ‚ant licence-gpl‘ for details.
|
franta-hg@60
|
163 |
${čára}</echo>
|
franta-hg@60
|
164 |
</target>
|
franta-hg@87
|
165 |
|
franta-hg@60
|
166 |
<target name="licence-gpl">
|
franta-hg@60
|
167 |
<loadfile property="licence.txt" srcFile="licence/licence.txt"/>
|
franta-hg@60
|
168 |
<loadfile property="gpl-3.0.txt" srcFile="licence/gpl-3.0.txt"/>
|
franta-hg@121
|
169 |
<echo>${čára}</echo>
|
franta-hg@121
|
170 |
<echo>${licence.txt}</echo>
|
franta-hg@121
|
171 |
<echo>${čára}</echo>
|
franta-hg@121
|
172 |
<echo>${gpl-3.0.txt}</echo>
|
franta-hg@121
|
173 |
<echo>${čára}</echo>
|
franta-hg@60
|
174 |
</target>
|
franta-hg@87
|
175 |
|
franta-hg@1
|
176 |
</project>
|
franta-hg@87
|
177 |
|