opale_to_epub2.ant 1.55 KB
Newer Older
cliclac's avatar
cliclac 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
<?xml version="1.0" encoding="UTF-8"?>
<project name="hdoc_to_epub2" basedir="." default="preparation">

  <taskdef resource="net/sf/antcontrib/antlib.xml"/>
  <taskdef name="jing" classname="com.thaiopensource.relaxng.util.JingTask"/>

  <property file="build.properties"/>
  
  <target name="preparation">
    <delete>
      <fileset dir="${inputOpaleToHdoc}" includes="**/*.scar"/>
    </delete>
    <delete>
      <fileset dir="${inputHdocToEpub2}" includes="**/*.hdoc"/>
    </delete>
    <delete dir="${output}"/>
    <mkdir dir="${output}"/>
    <chmod perm="777" dir="${output}"></chmod>

      
    <sequential>
      <antcall target="opaleToHdoc">
        <param name="filename" value="${filename}"/>
      </antcall>
      
      <antcall target="hdocToEpub2">
        <param name="filename" value="${filename}"/>
      </antcall>
      
      <antcall target="opaleToEpub2">
        <param name="filename" value="${filename}"/>
      </antcall>
    </sequential>
  
  </target>
  
  <target name="opaleToHdoc">
    <copy todir="${inputOpaleToHdoc}" >
      <fileset dir="${input}" includes="**/*.scar"/>
    </copy>
    <ant antfile="${antOpaleToHdoc}" inheritAll="false"/>
  </target>
  
  <target name="hdocToEpub2">
    <copy todir="${inputHdocToEpub2}" >
      <fileset dir="${outputOpaleToHdoc}" includes="**/*.hdoc"/>
    </copy>
    <ant antfile="${antHdocToEpub2}" inheritAll="false"/>
  </target>
  
  <target name="opaleToEpub2">
    <copy todir="${output}" >
      <fileset dir="${outputHdocToEpub2}" includes="**/*.epub"/>
    </copy>
  </target>
  
</project>