Commit 5bc52468 authored by Baptiste Perraud's avatar Baptiste Perraud

Update Readme and init ant

parent 77f9643f
......@@ -36,12 +36,13 @@ Known bugs
Todo
Generic Todo
----
* Generate a clean PDF file (using the LaTeX formatting example)
- Create a default CSS file with basic spine rules
- Get the right free font (equivalent to the LaTeX's one)
* Generate the ToC according to the converted (by XSL) headings of the hdoc
* Handle as fully as possible of widows and girl orphans; trying to match Prince's layout and implementing the suitable CSS rules (which shall not be interpreted by FS)
* Allow the user to override some specific CSS rules, according to the main layout logical rules
* Bonus: find out a HTML editor to manually add line breaks to a hdoc file in order to resolve widows and girl orphans problems after the PDF file's generation
......@@ -50,8 +51,8 @@ Todo
Technical notes
---------------
* The backlog of the current project is at the following url: https://framemo.org/NF29_Opale_to_Pdf
* The user stories of the current project are at the following url: https://bimestriel.framapad.org/p/NF29_Opale_to_Pdf_userstory
* The backlog of the current project is at the following url: <https://framemo.org/NF29_Opale_to_Pdf>
* The user stories of the current project are at the following url: <https://bimestriel.framapad.org/p/NF29_Opale_to_Pdf_userstory>
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project name="hdoc_to_opale" basedir="." default="convert">
<!--<taskdef resource="net/sf/antcontrib/antcontrib.properties">
<classpath>
<pathelement location="lib/ant-contrib.jar" />
</classpath>
</taskdef>-->
<!-- Arguments properties -->
<property name="InputPath" value="input" />
<property name="OutputPath" value="output" />
<property name="tmp" location="${basedir}/tmp"/>
<property name="OutputPdfPath" value="${OutputPath}/result.pdf" />
<target name="convert">
<echo message="The value of property of InputPath is ${InputPath}" />
<echo message="The value of property of OutputPath is ${OutputPath}" />
<echo message="The value of property of tmp is ${tmp}" />
<!-- Creation of temp dir -->
<delete dir="${tmp}" failonerror="false"/>
<sleep seconds="1"/>
<mkdir dir="${tmp}"/>
<!-- Get input hdoc file path -->
<fileset id="fileset_hdoc" dir="${InputPath}" casesensitive="yes">
<include name="*.hdoc"/>
</fileset>
<pathconvert property="HdocFile" pathsep="" refid="fileset_hdoc" />
<echo message="Executing conversion..." />
<!-- Unzips the hdoc to be converted-->
<unzip dest="${tmp}" src ="${HdocFile}"/>
<!-- Gives all rights to avoid bugs-->
<chmod dir="${tmp}" perm="777"/>
<!--launches the XSLT find_content to retrieve the content path-->
<!--<xslt in="${tmp}/META-INF/container.xml" out="get_content.ant" style="xsl/find_content.xsl">
<param name="DocumentType" expression="${DocType}"/>
</xslt>-->
<!--temporary files and folders are deleted-->
<!--<delete dir="{tmp}"/>-->
<!--<delete dir="result"/>
<delete file="get_content.ant"/>
<delete file="get_ressources.ant"/>-->
</target>
</project>
@echo off
set lib=lib
set ant=hdoc_to_pdf.ant
set antparam=-Dprogram.param=%1
set scJarList=%lib%\*
java.exe -classpath "%scJarList%" -Xmx150m org.apache.tools.ant.Main -buildfile %ant% %antparam%
pause
REM start /MIN java.exe -classpath "%scJarList%" -Xmx150m org.apache.tools.ant.Main -buildfile %ant% %antparam%
#!/bin/sh
lib="lib"
ant="hdoc_to_pdf.ant"
antparam="-Dprogram.param=$1"
#Recherche de java et controle que se soit une version SUN
vJavaCmd="java"
xCheckJava () {
vInputVarName=\$"$1"
vInputVarVal=`eval "expr \"$vInputVarName\" "`
if [ -z "$vInputVarVal" ];then
eval "$1=false"
return
fi
vSunJavaFound=`$vInputVarVal -version 2>&1 | grep -Eo -m 1 "(HotSpot)|(OpenJDK)"`
if [ "$vSunJavaFound" != "HotSpot" ] && [ "$vSunJavaFound" != "OpenJDK" ] ; then
eval "$1=false"
return
fi
}
xCheckJava vJavaCmd
if [ "$vJavaCmd" = "false" ]; then
vJavaCmd="$JAVA_HOME/bin/java"
xCheckJava vJavaCmd
if [ "$vJavaCmd" = "false" ]; then
echo "ERREUR: JRE de SUN introuvable. Veuillez déclarer la variable d'environnement JAVA_HOME."
exit 1
fi
fi
#Lancer la commande
scJarList="$lib/*"
$vJavaCmd -classpath "$scJarList:" -Xmx150m org.apache.tools.ant.Main -buildfile $ant $antparam
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment