-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
610 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project basedir="." name="wordinator" default="package-release"> | ||
|
||
<!-- This Ant script just manages creating the release package. | ||
It's a shortcut in advance of creating a proper Maven | ||
version of this. | ||
It assumes you've already run mvn install to generate | ||
the jar files. | ||
--> | ||
|
||
<property file="version.properties"/> | ||
<property name="target.dir" value="${basedir}/target"/> | ||
<property name="src.dir" value="${basedir}/src/main"/> | ||
<property name="resources.dir" value="${basedir}/src/test/resources"/> | ||
<property name="dist.dir" value="${basedir}/dist"/> | ||
<property name="package.name" value="wordinator"/> | ||
<property name="package.dir" value="${dist.dir}/${package.name}"/> | ||
|
||
<target name="init"> | ||
<tstamp/> | ||
<buildnumber/> | ||
</target> | ||
|
||
<target name="dist" depends="init" > | ||
<delete dir="${dist.dir}" failonerror="false"/> | ||
<mkdir dir="${package.dir}"/> | ||
<copy todir="${package.dir}"> | ||
<fileset dir="${target.dir}"> | ||
<include name="wordinator-*-jar-with-dependencies.jar"/> | ||
</fileset> | ||
<regexpmapper from="^(.+)\-[\d]+\..+\.jar$" to="\1.jar"/> | ||
</copy> | ||
<copy todir="${package.dir}"> | ||
<fileset dir="${resources.dir}"> | ||
<include name="docx/**/*"/> | ||
<include name="html/**/*"/> | ||
<exclude name="**/out/**"/> | ||
</fileset> | ||
<fileset dir="${src.dir}"> | ||
<include name="xsl/**/*"/> | ||
<include name="doctypes/**/*"/> | ||
</fileset> | ||
<fileset dir="${src.dir}/ant"> | ||
<include name="**/*"/> | ||
</fileset> | ||
<fileset dir="${basedir}"> | ||
<include name="README.md"/> | ||
<include name="LICENSE"/> | ||
</fileset> | ||
</copy> | ||
</target> | ||
|
||
<target name="package-release" depends="dist" description="Create a release package"> | ||
<zip file="${dist.dir}/${package.name}_${version}.zip"> | ||
<fileset dir="${package.dir}"> | ||
<include name="**/*"/> | ||
</fileset> | ||
</zip> | ||
</target> | ||
|
||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project basedir="." name="run-wordinator" default="ditahtml2docx"> | ||
<!-- ========================================================= | ||
Ant script to run the Wordinator Java command-line | ||
tool. | ||
You can create a file named "build.properties" in the | ||
same directory to set any of the properties used | ||
to construct the command line or pass them | ||
in using -D{propertyname}={value}: | ||
ant -Dditahtml2docx.dotx=myTemplate.dotx | ||
========================================================= --> | ||
|
||
<property file="build.properties"/> | ||
|
||
<property name="xsl.dir" value="${basedir}/xsl"/> | ||
<property name="docx.dir" value="${basedir}/docx"/> | ||
<property name="ditahtml2docx.xsl" value="${xsl.dir}/ditahtml2docx/ditahtml2docx.xsl"/> | ||
<property name="html2docx.xsl" value="${xsl.dir}/html2docx/html2docx.xsl"/> | ||
<property name="ditahtml2docx.dotx" value="${docx.dir}/Test_Template.dotx"/> | ||
<property name="html2docx.dotx" value="${docx.dir}/Test_Template.dotx"/> | ||
<property name="output.dir" value="${basedir}/out"/> | ||
<property name="input.html" value="${basedir}/html/sample_web_page.html"/> | ||
<property name="webinator.jar" value="${basedir}/wordinator.jar"/> | ||
|
||
<target name="init"> | ||
<tstamp/> | ||
<buildnumber/> | ||
</target> | ||
|
||
<target name="ditahtml2docx" depends="init" | ||
description="Run Wordinator against XHTML or HTML5 generated by the DITA Open Toolkit"> | ||
|
||
<java jar="${webinator.jar}" failonerror="true" fork="true"> | ||
<arg line="-i ${input.html}"/> | ||
<arg line="-o ${output.dir}"/> | ||
<arg line="-x ${ditahtml2docx.xsl}"/> | ||
<arg line="-t ${ditahtml2docx.dotx}"/> | ||
</java> | ||
|
||
</target> | ||
|
||
<target name="html2docx" depends="init" | ||
description="Run Wordinator against arbitrary XHTML or HTML5" | ||
> | ||
|
||
<java jar="${webinator.jar}" failonerror="true" fork="true"> | ||
<arg line="-i ${input.html}"/> | ||
<arg line="-o ${output.dir}"/> | ||
<arg line="-x ${html2docx.xsl}"/> | ||
<arg line="-t ${html2docx.dotx}"/> | ||
</java> | ||
|
||
</target> | ||
|
||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.