wiki_to_canoprof_fetcher.ant 2.69 KB
Newer Older
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
59
60
61
62
63
64
65
66
67
68
69
70
<?xml version="1.0" encoding="UTF-8"?>
<project name="wikiToCanoprof" default="main" basedir="..">
    
    <!-- Path -->
    <property name="resultPath"        value="${basedir}/result"/>
    <property name="hdoc_to_canoprof" location="${basedir}/../hdoc_to_canoprof"/>
    
    <target name="main">
        <antcall target="wiki_to_hdoc"/>
        <antcall target="move_output_hdoc_wikipediaToHdoc_into_input_hdocToCanoprof"/>
        <antcall target="hdoc_to_canoprof"/>
        <antcall target="move_output_hdocToCanoprof_into_ouput_wikipediaToCanoprof"/>
    </target>
    
    <target name="wiki_to_hdoc">
        <!-- First: wiki to Hdoc -->
        <ant antfile="../wikipedia_to_hdoc/ant/wiki_to_hdoc_fetcher.ant" dir="../wikipedia_to_hdoc"/>
    </target>
    
    <target name="move_output_hdoc_wikipediaToHdoc_into_input_hdocToCanoprof">
        <!--copy .hdoc file from wikipedia_to_hdoc_result into input of hdoc_to_opale -->
        <!--<delete dir="../hdoc_to_canoprof/input"/>
        <mkdir dir="../hdoc_to_canoprof/input"/>
        <copy todir="../hdoc_to_canoprof/input" file="../wikipedia_to_hdoc/result/${filename}/${filename}.hdoc"/> -->
		<mkdir dir="./testing_ant"/>
		<copy todir="./testing_ant" file="../wikipedia_to_hdoc/result/${filename}/${filename}.hdoc"/>
    </target>
    
    <target name="hdoc_to_canoprof">
        <!-- Mandatory ressource to use if conditions -->
        <taskdef resource="net/sf/antcontrib/antlib.xml">
            <classpath>
                <fileset dir="lib"/>
            </classpath>
        </taskdef>
        
        <!-- Check for family OS -->
        <condition property="is_windows">
            <os family="windows"/>
        </condition>
        
        <condition property="is_unix">
            <os family="unix"/>
        </condition>
        
        <antcall target="run_hdoc_to_canoprof_unix"/>
        <antcall target="run_hdoc_to_canoprof_windows"/>
    </target>
    
    <!-- Run hdoc_to_canoprof bat -->
    <target name="run_hdoc_to_canoprof_windows" if="${is_windows}"> 
        <!--<exec executable="cmd" dir="${hdoc_to_canoprof}">
            <arg value="/c"/>
            <arg value="${hdoc_to_canoprof}/run.bat"/>
        </exec>-->
    </target>
    
    <!-- Run hdoc_to_canoprof sh -->
    <target name="run_hdoc_to_canoprof_unix" if="${is_unix}">
        <!--<exec executable="/bin/bash" dir="${hdoc_to_canoprof}">
            <arg value="${hdoc_to_canoprof}/run.sh"/>
        </exec>-->
    </target>
    
    <target name="move_output_hdocToCanoprof_into_ouput_wikipediaToCanoprof">
        <!--<copy todir="${resultPath}" failonerror="false">  
            <fileset dir="../hdoc_to_canoprof/output" includes="**"/>  
        </copy>-->
    </target>
</project>