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@2
|
21 |
<!-- 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
|
22 |
<property name="vstup" value="vstup"/>
|
franta-hg@1
|
23 |
<property name="výstup" value="výstup"/>
|
franta-hg@1
|
24 |
<property name="šablona" value="šablona"/>
|
franta-hg@51
|
25 |
<property name="seznamMaker" value="${šablona}/.makra-seznam.xsl"/>
|
franta-hg@1
|
26 |
<property name="temp" value="temp"/>
|
franta-hg@2
|
27 |
<property name="funkce" value="${šablona}/funkce/build/classes"/>
|
franta-hg@60
|
28 |
<property name="čára" value="----------------------------------------------------------------"/>
|
franta-hg@1
|
29 |
|
franta-hg@15
|
30 |
<property name="vstupníPřípona" value=".xml"/>
|
franta-hg@15
|
31 |
<property name="výstupníPřípona" value=".xhtml"/>
|
franta-hg@15
|
32 |
|
franta-hg@60
|
33 |
<target name="generuj" description="Vygeneruje kompletní web." depends="licence,agregace,stránky">
|
franta-hg@6
|
34 |
</target>
|
franta-hg@6
|
35 |
|
franta-hg@51
|
36 |
<target name="stránky" description="Vygeneruje samotné XHTML webové stránky." depends="statický-obsah,syntaxe,kompiluj-funkce,makra">
|
franta-hg@20
|
37 |
<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@15
|
38 |
<param name="podporaZaostalýchProhlížečů" expression="false"/>
|
franta-hg@15
|
39 |
<param name="vstupníPřípona" expression="${vstupníPřípona}"/>
|
franta-hg@15
|
40 |
<param name="výstupníPřípona" expression="${výstupníPřípona}"/>
|
franta-hg@2
|
41 |
<classpath location="/usr/share/java/saxonb-9.0.jar"/>
|
franta-hg@6
|
42 |
<classpath location="${funkce}"/>
|
franta-hg@6
|
43 |
<factory name="net.sf.saxon.TransformerFactoryImpl">
|
franta-hg@4
|
44 |
<attribute name="http://saxon.sf.net/feature/allow-external-functions" value="true"/>
|
franta-hg@2
|
45 |
</factory>
|
franta-hg@2
|
46 |
</xslt>
|
franta-hg@1
|
47 |
</target>
|
franta-hg@1
|
48 |
|
franta-hg@31
|
49 |
<target name="syntaxe" description="Vygeneruje CSS styl pro zvýrazňování syntaxe" depends="kompiluj-funkce">
|
franta-hg@31
|
50 |
<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@31
|
51 |
<classpath location="/usr/share/java/saxonb-9.0.jar"/>
|
franta-hg@31
|
52 |
<classpath location="${funkce}"/>
|
franta-hg@31
|
53 |
<factory name="net.sf.saxon.TransformerFactoryImpl">
|
franta-hg@31
|
54 |
<attribute name="http://saxon.sf.net/feature/allow-external-functions" value="true"/>
|
franta-hg@31
|
55 |
</factory>
|
franta-hg@31
|
56 |
</xslt>
|
franta-hg@31
|
57 |
</target>
|
franta-hg@31
|
58 |
|
franta-hg@51
|
59 |
<target name="makra" description="Vygeneruje seznam maker podle souborů v příslušných složkách" depends="kompiluj-funkce">
|
franta-hg@51
|
60 |
<xslt in="${vstup}/web.conf" out="${seznamMaker}" style="${šablona}/makra.xsl" processor="org.apache.tools.ant.taskdefs.optional.TraXLiaison">
|
franta-hg@51
|
61 |
<classpath location="/usr/share/java/saxonb-9.0.jar"/>
|
franta-hg@51
|
62 |
<classpath location="${funkce}"/>
|
franta-hg@51
|
63 |
<factory name="net.sf.saxon.TransformerFactoryImpl">
|
franta-hg@51
|
64 |
<attribute name="http://saxon.sf.net/feature/allow-external-functions" value="true"/>
|
franta-hg@51
|
65 |
</factory>
|
franta-hg@51
|
66 |
</xslt>
|
franta-hg@51
|
67 |
</target>
|
franta-hg@51
|
68 |
|
franta-hg@22
|
69 |
<target name="agregace" description="Vytvoří agregované výstupy: RSS, Atom, Sitemap.xml." depends="kompiluj-funkce">
|
franta-hg@9
|
70 |
<!-- TODO: sloučit, zjednodušit, parametrizovat -->
|
franta-hg@9
|
71 |
|
franta-hg@7
|
72 |
<!-- Atom -->
|
franta-hg@20
|
73 |
<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
|
74 |
<param name="vstupníPřípona" expression="${vstupníPřípona}"/>
|
franta-hg@15
|
75 |
<param name="výstupníPřípona" expression="${výstupníPřípona}"/>
|
franta-hg@6
|
76 |
<classpath location="/usr/share/java/saxonb-9.0.jar"/>
|
franta-hg@9
|
77 |
<classpath location="${funkce}"/>
|
franta-hg@6
|
78 |
<factory name="net.sf.saxon.TransformerFactoryImpl">
|
franta-hg@6
|
79 |
<attribute name="http://saxon.sf.net/feature/allow-external-functions" value="true"/>
|
franta-hg@6
|
80 |
</factory>
|
franta-hg@7
|
81 |
</xslt>
|
franta-hg@7
|
82 |
|
franta-hg@8
|
83 |
<!-- RSS -->
|
franta-hg@20
|
84 |
<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@8
|
85 |
<classpath location="/usr/share/java/saxonb-9.0.jar"/>
|
franta-hg@9
|
86 |
<classpath location="${funkce}"/>
|
franta-hg@8
|
87 |
<factory name="net.sf.saxon.TransformerFactoryImpl">
|
franta-hg@8
|
88 |
<attribute name="http://saxon.sf.net/feature/allow-external-functions" value="true"/>
|
franta-hg@8
|
89 |
</factory>
|
franta-hg@8
|
90 |
</xslt>
|
franta-hg@8
|
91 |
|
franta-hg@15
|
92 |
<!-- Sitemap.xml -->
|
franta-hg@20
|
93 |
<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@9
|
94 |
<classpath location="/usr/share/java/saxonb-9.0.jar"/>
|
franta-hg@9
|
95 |
<classpath location="${funkce}"/>
|
franta-hg@9
|
96 |
<factory name="net.sf.saxon.TransformerFactoryImpl">
|
franta-hg@9
|
97 |
<attribute name="http://saxon.sf.net/feature/allow-external-functions" value="true"/>
|
franta-hg@9
|
98 |
</factory>
|
franta-hg@9
|
99 |
</xslt>
|
franta-hg@8
|
100 |
|
franta-hg@24
|
101 |
<!-- Seznam stránek -->
|
franta-hg@24
|
102 |
<xslt in="${výstup}/atom.xml" out="${vstup}/.seznam.xml" style="${šablona}/seznam.xsl" processor="org.apache.tools.ant.taskdefs.optional.TraXLiaison">
|
franta-hg@24
|
103 |
<classpath location="/usr/share/java/saxonb-9.0.jar"/>
|
franta-hg@24
|
104 |
<classpath location="${funkce}"/>
|
franta-hg@24
|
105 |
<factory name="net.sf.saxon.TransformerFactoryImpl">
|
franta-hg@24
|
106 |
<attribute name="http://saxon.sf.net/feature/allow-external-functions" value="true"/>
|
franta-hg@24
|
107 |
</factory>
|
franta-hg@24
|
108 |
</xslt>
|
franta-hg@24
|
109 |
|
franta-hg@6
|
110 |
</target>
|
franta-hg@6
|
111 |
|
franta-hg@11
|
112 |
<target name="kompiluj-funkce" description="Přeloží funkce napsané v Javě.">
|
franta-hg@6
|
113 |
<mkdir dir="${funkce}"/>
|
franta-hg@6
|
114 |
<javac
|
franta-hg@6
|
115 |
srcdir="${šablona}/funkce/src"
|
franta-hg@6
|
116 |
destdir="${funkce}"
|
franta-hg@6
|
117 |
includeAntRuntime="no">
|
franta-hg@6
|
118 |
</javac>
|
franta-hg@6
|
119 |
</target>
|
franta-hg@6
|
120 |
|
franta-hg@11
|
121 |
<target name="statický-obsah" description="Kopíruje JS, CSS, obrázky atd.">
|
franta-hg@11
|
122 |
<copy todir="${výstup}">
|
franta-hg@78
|
123 |
<fileset dir="${vstup}" excludes="*.xml,makra/**,*.inc,web.conf"/>
|
franta-hg@11
|
124 |
</copy>
|
franta-hg@11
|
125 |
</target>
|
franta-hg@11
|
126 |
|
franta-hg@11
|
127 |
<target name="čisti" description="Smaže vygenerovaný obsah.">
|
franta-hg@11
|
128 |
<delete includeemptydirs="true">
|
franta-hg@11
|
129 |
<fileset dir="${výstup}" includes="**/*"/>
|
franta-hg@11
|
130 |
<fileset dir="${funkce}" includes="**/*"/>
|
franta-hg@51
|
131 |
<fileset file="${seznamMaker}"/>
|
franta-hg@11
|
132 |
</delete>
|
franta-hg@11
|
133 |
</target>
|
franta-hg@11
|
134 |
|
franta-hg@64
|
135 |
<target name="prohlédni" description="Otevře vygenerované stránky ve www prohlížeči.">
|
franta-hg@64
|
136 |
<exec executable="x-www-browser" os="Linux">
|
franta-hg@64
|
137 |
<arg value="${výstup}/index${výstupníPřípona}"/>
|
franta-hg@64
|
138 |
</exec>
|
franta-hg@64
|
139 |
</target>
|
franta-hg@64
|
140 |
|
franta-hg@60
|
141 |
<target name="licence">
|
franta-hg@60
|
142 |
<echo>${čára}
|
franta-hg@60
|
143 |
XML Web generátor Copyright © 2012 František Kučera (frantovo.cz)
|
franta-hg@60
|
144 |
This program comes with ABSOLUTELY NO WARRANTY;
|
franta-hg@60
|
145 |
This is free software, and you are welcome to redistribute it
|
franta-hg@60
|
146 |
under certain conditions; type ‚ant licence-gpl‘ for details.
|
franta-hg@60
|
147 |
${čára}</echo>
|
franta-hg@60
|
148 |
</target>
|
franta-hg@60
|
149 |
|
franta-hg@60
|
150 |
<target name="licence-gpl">
|
franta-hg@60
|
151 |
<loadfile property="licence.txt" srcFile="licence/licence.txt"/>
|
franta-hg@60
|
152 |
<loadfile property="gpl-3.0.txt" srcFile="licence/gpl-3.0.txt"/>
|
franta-hg@60
|
153 |
<echo>${čára}</echo>
|
franta-hg@60
|
154 |
<echo>${licence.txt}</echo>
|
franta-hg@60
|
155 |
<echo>${čára}</echo>
|
franta-hg@60
|
156 |
<echo>${gpl-3.0.txt}</echo>
|
franta-hg@60
|
157 |
<echo>${čára}</echo>
|
franta-hg@60
|
158 |
</target>
|
franta-hg@60
|
159 |
|
franta-hg@1
|
160 |
</project>
|