hdoc_to_elasticsearch.ant 1.12 KB
Newer Older
Gregory's avatar
Gregory 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
<project name="hdoc_to_elasticsearch" default="unzipSource">

	<property file="build.properties"/>
    <target name="unzipSource">
		<echo message="Conversion begin" />
		<path id="hdocDirPath">
			<fileset dir="${inputPath}" id="hdocFile">
				<include name="*.hdoc"/>
			</fileset> 
		</path>
		
		<property name="hdocFile" refId="hdocDirPath"/>
		<basename property="hdocFileName" file="${hdocFile}" suffix=".hdoc"/>
		
        <echo>Entry file : ${hdocFileName}</echo>
		
		<!-- create subdirectory for each file -->
		<mkdir dir="${outputPath}/${hdocFileName}"/>
		
		<!--unzips the hdoc to be converted into the previously created directory-->
		<unzip dest="${outputPath}/${hdocFileName}">
			<fileset dir="${inputPath}" id="hdocFile">
				<include name="${hdocFileName}.hdoc"/>
			</fileset> 
		</unzip>
		<echo message="Conversion end" />
    </target>
	
	<target name="jsonFiles" depends="unzipSource"> 
		<echo message="JSON File creation" />
		<!-- TODO : create JSON & extract data -->
	</target>
	
	
	<!-- Clear tmp files -->
	<target name="clean" depends="jsonFiles">
     
    </target>

	<echo message="Conversion end" />
</project>