hdoc_to_pdf.ant 1.8 KB
Newer Older
Baptiste Perraud's avatar
Baptiste Perraud committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
<?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>