lexique_to_optim.ant 2.13 KB
Newer Older
Antoine's avatar
-a  
Antoine committed
1 2 3 4 5 6 7 8 9 10 11
<?xml version="1.0" encoding="UTF-8"?>
<project name="project" default="clean" basedir=".">

	<property file="build.properties"/>
	
	<taskdef name="jing" classname="com.thaiopensource.relaxng.util.JingTask">
		<classpath>
			<pathelement location="${libdir}/jing.jar"/>
		</classpath>
	</taskdef>

Antoine's avatar
Antoine committed
12 13 14 15 16 17 18

	<taskdef resource="net/sf/antcontrib/antlib.xml">
		<classpath>
		    <pathelement location="lib/ant-contrib.jar"/>
		</classpath>
	</taskdef>

Antoine's avatar
-a  
Antoine committed
19 20 21 22 23 24 25 26
	<target name="init">
		<mkdir dir="${outdir}"/>
		<chmod perm="777" dir="${outdir}"></chmod>
		<mkdir dir="${srcdir}"/>
		<chmod perm="777" dir="${srcdir}"></chmod>
	</target>
	
	<target name="unzipSource" depends="init">
Antoine's avatar
Antoine committed
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
		<for param="file">
			<path>
				<fileset dir="${InputPath}" id="inputsId">
					<include name="*.zip"/>
					<include name="*.scar"/>
				</fileset>    
			</path>  
			<sequential>
				<local name="TODAY_MY"/>
				<tstamp>
			      <format property="TODAY_MY" pattern="yyyyMMdd-HHmmss"  locale="en,UK" />
			  	</tstamp>
				<var name="name" unset="true"/>
			    <basename file="@{file}" property="name" />
				<unzip src="${InputPath}/${name}" dest="${srcdir}/${TODAY_MY}"></unzip>
				<sleep seconds="1"> </sleep>
			</sequential>
		</for>
Antoine's avatar
-a  
Antoine committed
45 46 47
	</target>
	
	<target name="buildOutput" depends="unzipSource">
Antoine's avatar
Antoine committed
48
		<xslt classpath="${libdir}/saxon9he.jar" style="${xsldir}/termToRefs.xsl" basedir="${srcdir}" destdir="${OutputPath}" followsymlinks="false" extension=".refs">
Antoine's avatar
-a  
Antoine committed
49 50 51 52
		    <include name="**/*.term"/>
			<param name="srcdir" expression="${srcdir}"/>
			<param name="outdir" expression="${outdir}"/>
		</xslt>
Antoine's avatar
Antoine committed
53

Antoine's avatar
-a  
Antoine committed
54 55 56 57 58 59 60 61
		<!--<jing rngfile="${rngdir}/of_def.rng">
			<fileset dir="${outdir}">
				<include name="**/*.refs"/>
			</fileset>
		</jing>-->
	</target>
	
	<target name="imageCopy" depends="unzipSource">
Antoine's avatar
Antoine committed
62
		<copy todir="${OutputPath}">
Antoine's avatar
-a  
Antoine committed
63 64 65 66 67 68 69 70
			<fileset dir="${srcdir}">
				<include name="**/*.jpg"/>
				<include name="**/*.png"/>
				<include name="**/*.gif"/>
			</fileset>
		</copy>		
	</target>
	
Antoine's avatar
Antoine committed
71
	<target name="clean" depends="buildOutput,imageCopy">
Antoine's avatar
-a  
Antoine committed
72 73 74 75 76
		<delete dir="${srcdir}" />
		<delete dir="${outdir}" />
	</target>
	
</project>