hdoc_to_lexique.ant 1.94 KB
Newer Older
1
<project name="hdoc_to_lexique" default="clean">	
Antoine's avatar
Antoine committed
2
	
3
	<property file="build.properties"/>
Antoine's avatar
Antoine committed
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
    <target name="init">
        <mkdir dir="${srcdir}"/>
        <chmod perm="777" dir="${srcdir}"></chmod>
        <mkdir dir="${outdir}"/>
        <chmod perm="777" dir="${outdir}"></chmod>
		<delete dir="${OutputPath}" />
        <mkdir dir="${OutputPath}"/>
        <chmod perm="777" dir="${OutputPath}"></chmod>
    </target>
    
    
    <target name="unzipSource" depends="init">
        <fileset dir="${InputPath}" id="inputsId">
            <include name="*.zip"/>
            <include name="*.scar"/>
        </fileset>      
        <property name="nameInputsId" refid="inputsId"/>
        
        <echo>Fichier en entree : ${nameInputsId}</echo>
        <unzip src="${InputPath}/${nameInputsId}" dest="${srcdir}/${nameInputsId}"></unzip>
    </target>
    
    
    
    
    <target name="buildContainer"  depends="unzipSource">
        
        <!--launches the XSLT find_content to retrieve the content path-->
        <xslt in="${srcdir}/${nameInputsId}/META-INF/container.xml" out="get_content.ant" style="${xsldir}/find_content.xsl"/>
        <chmod file="get_content.ant" perm="777"/>
        
        <echo>5</echo>
        <!--launches the ANT get_content resulting from the previous XSLT in order to launch the conversion-->
        <ant antfile="get_content.ant"/>
        
        <!--once the conversion is complete, the result is copy into the output directory-->
        <!--<zip basedir="result" destfile="${OutputScarPath}"/>-->
        <echo>6</echo>
        <!-- TODO change ${outdir}/result-->
        <copydir src="${outdir}" dest="${OutputPath}/lexique-result"></copydir>
        
        <echo>6</echo>
    </target>
    
    <target name="clean" depends="buildContainer">
50
        <delete file="get_content.ant"/>
51 52
        <delete file="get_ressources.ant"/>
        <delete dir="${srcdir}" />
53
        <delete dir="${outdir}" />
54 55 56
    </target>
   
</project>