tbrugz avatar tbrugz committed 376341b

build: adicionando tarefas para geração de HTML: run-proc-html e run-proc-htmlchunked

Comments (0)

Files changed (4)

 
 * copiar `xsl/docbook-tcc-input.template.xsl` para `xsl/docbook-tcc-input.xsl` e (opcional) alterá-lo
 * (opcional) copiar `local.template.properties` para `local.properties` e alterá-lo 
-* ant: build-all: gera PDF, RTF e EPUB
+* ant: build-all: gera PDF, RTF, EPUB e HTML (em página única ou diversas - _chunked_)
 
 _outras tarefas ant:_
 
 	<property name="file.rtfoutput" value="${dist}/tcc-output.rtf"/>
 	<property name="file.epub.builddir" value="${build}/epub"/>
 	<property name="file.epub.output" value="${dist}/tcc-output.epub"/>
+	<property name="file.html.outputdir" value="${dist}/html"/>
+	<property name="file.html.output" value="${file.html.outputdir}/tcc-output.html"/>
+	<property name="file.htmlchunked.outputdir" value="${dist}/html-chunked"/>
 
 	<!-- xsl template properties -->
 	<property name="file-template.xmlinput" value="${xsl.dir}/tcc-eco-xsltemplate.xml"/>
 		</java>
 	</target>
 	
+	<target name="run-proc-html" depends="prepare">
+		<mkdir dir="${file.html.outputdir}"/>
+		<java classname="org.apache.xalan.xslt.Process" classpathref="foppath" fork="true">
+		    <arg value="-in"/>
+		    <arg value="${file.xmlinput}"/>
+		    <arg value="-xsl"/>
+		    <arg value="${docbook-xsl-dir}/html/docbook.xsl"/>
+		    <arg value="-out"/>
+		    <arg value="${file.html.output}"/>
+		</java>
+		<copy todir="${file.html.outputdir}">
+			<fileset dir="${srcfiles.dir}/" includes="**/*.png, **/*.jpg"/>
+		</copy>
+	</target>
+
+	<target name="run-proc-htmlchunked" depends="prepare">
+		<mkdir dir="${file.htmlchunked.outputdir}"/>
+		<java classname="org.apache.xalan.xslt.Process" classpathref="foppath" fork="true">
+		    <arg value="-in"/>
+		    <arg value="${file.xmlinput}"/>
+		    <arg value="-xsl"/>
+		    <arg value="${docbook-xsl-dir}/html/chunk.xsl"/>
+		    <arg value="-out"/>
+		    <arg value="${file.htmlchunked.outputdir}/index.html"/>
+		</java>
+		<copy todir="${file.htmlchunked.outputdir}">
+			<fileset dir="${srcfiles.dir}/" includes="**/*.png, **/*.jpg"/>
+		</copy>
+	</target>
+	
 	<target name="run-proc-fop-rtf" depends="prepare">
 		<java classname="org.apache.fop.cli.Main" classpathref="foppath" fork="true">
 		    <arg value="-catalog"/>
 	
 	<target name="fop+acroread" depends="run-proc-xsl-template, run-proc-fop-pdf, run-acroread"/>
 
-	<target name="build-all" depends="compile, run-proc-xsl-template, run-proc-fop-pdf, run-proc-fop-rtf, run-proc-epub"/>
+	<target name="build-all" depends="compile, run-proc-xsl-template, run-proc-fop-pdf, run-proc-fop-rtf, run-proc-epub, run-proc-html, run-proc-htmlchunked"/>
 
 	<target name="dtd-validate">
 		<!--xmlvalidate failonerror="yes" lenient="no" warn="yes" file="${file.xmlinput}"-->

local.template.properties

 #file.pdfoutput=dist/tcc-output.pdf
 #file.rtfoutput=dist/tcc-output.rtf
 #file.epub.output=dist/tcc-output.epub
+
+#file.html.outputdir=dist/html
+#file.html.output=dist/html/tcc-output.html
+#file.htmlchunked.outputdir=dist/htmlchunked
 - fazer uppercase do nome do título no xsl
 x validar epub. ver: http://en.wikipedia.org/wiki/EPUB / http://wiki.mobileread.com/wiki/EPub
 - processo de configuraçăo do ambiente: deve-se 1o copiar arquivos template para arquivos finais para depois alterá-los
-- HTML output (chunked e/ou năo)
+x HTML output (chunked e/ou năo)
+- html output: 
+  - remover índices de início de capítulos (năo-chunked)
+  - imagens com problemas?
+- epub: copiar para pasta de build somente figuras referenciadas pelo texto
 - somente incluir referęncias apontadas pelo texto? bibtex-like? ver:
   - http://www.dpawson.co.uk/docbook/tools.html#d884e1198 - Formatting DocBook bibliographies
   - http://www.dpawson.co.uk/docbook/tools.html#d884e2317 - RefDB and JReference comparison
   - http://www.lsv.ens-cachan.fr/~schmitz/code/bibdb/
   - http://sourceforge.net/projects/bib2db5/
   - http://lists.oasis-open.org/archives/docbook-apps/200201/msg00405.html - Bibliography management/BibTex equivalent
-  - http://lists.oasis-open.org/archives/docbook-apps/200209/msg00057.html - Re: DOCBOOK: Announce: BibTex for Docbook
+  - http://lists.oasis-open.org/archives/docbook-apps/200209/msg00057.html - Re: DOCBOOK: Announce: BibTex for Docbook
+  - ideia: 
+    - fazer busca pelo docbook (xpath? xsl?) procurando pelas referencias.
+    - para cada referęncia distinta, buscar numa docbook-base de bibliomixed as referęncias e gerar um novo docbook com as referęncias selecionadas (possibilidade de ordenar referęncias)
+    - mudar, a măo, a referęncia (DTD ENTITY) de bibliografia para o novo documento de biblio
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.