Commit 504a266b authored by Ivan D'halluin's avatar Ivan D'halluin
Browse files

fix url /optim and allow multiple scar at a time, need to be tested

parent d2db9473
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." name="myantce">
<taskdef resource="net/sf/antcontrib/antlib.xml"/>
<property name="in" location="${basedir}/input"/>
<property name="out" location="${basedir}/output"/>
<property name="tmp" location="${basedir}/tmp"/>
......@@ -19,18 +22,27 @@
<echo message="Extract files..."/>
<unzip dest="${tmp}/extract">
<fileset dir="${in}">
<include name="**/*.scar"/>
</fileset>
</unzip>
<for param="archive">
<path>
<fileset dir="${in}" includes="*"/>
</path>
<sequential>
<echo message="@{archive}"></echo>
<unzip src="@{archive}" dest="${tmp}/extract"></unzip>
</sequential>
</for>
<echo message="Internationalize files..."/>
<xslt useImplicitFileset="false" destdir="${tmp}/internationalisation" style="${xsl}/internalisation.xsl">
<param name="currentDir" expression="${basedir}"/>
<param name="currentDir" expression="."/>
<fileset dir="${tmp}/extract">
<include name="*/*"/> <!-- only converting the root files, not the ressources of subfolders -->
<!-- only converting the root files -->
<include name="*/*.paper"/>
<include name="*/*.section"/>
<include name="*/*.website"/>
<include name="*/*.slideshow"/>
<include name="*/*.webpage"/>
</fileset>
</xslt>
......@@ -42,23 +54,26 @@
<copy todir="${out}">
<fileset dir="${tmp}/extract">
<exclude name="*/*"/> <!-- only copying resources files -->
<!-- only copying resources files -->
<exclude name="*/*.paper"/>
<exclude name="*/*.section"/>
<exclude name="*/*.website"/>
<exclude name="*/*.slideshow"/>
<exclude name="*/*.webpage"/>
</fileset>
</copy>
<echo message="Zip result..."/>
<antcall target="createApplicationDAA"/>
<target name="createApplicationDAA">
<for param="folder">
<path>
<fileset dir="${out}/*"/>
<dirset dir="${out}" includes="*"/>
</path>
<sequential>
<echo>@{folder}</echo>
<zip basedir="${folder}" destfile="${folder}.zip">
</zip>
<local name="folder_name"/>
<basename property="folder_name" file="@{folder}"/>
<zip destfile="${out}/${folder_name}.zip" basedir="@{folder}" ></zip>
</sequential>
</for>
</target>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<?oxygen RNGSchema="http://scenari.utc.fr/hdoc/schemas/xhtml/hdoc1-xhtml.rng" type="xml"
?>
<html xmlns:of="scpf.org:office"
xmlns:sp="http://www.utc.fr/ics/scenari/v3/primitive"
xmlns:sc="http://www.utc.fr/ics/scenari/v3/core"
xmlns="http://www.utc.fr/ics/hdoc/xhtml">
<head>
<title>Hdoc Converter Portal (v0.2) Demo</title>
<meta charset="utf-8"/>
<meta name="author" content=""/>
</head>
<body>
<div>
<h6>Hdoc Converter Portal (v0.2) Demo </h6>
<img src="optim//home/ivan/Downloads/projets/hdoc/optim_to_hdoc/re/screen1.png/screen1.png"
alt=""/>
<img src="optim//home/ivan/Downloads/projets/hdoc/optim_to_hdoc/re/screen2.png/screen2.png"
alt=""/>
</div>
</body>
</html>
......@@ -32,10 +32,8 @@
<h6>Hdoc Converter Portal (v0.2) Demo </h6>
<img src="optim//home/ivan/Downloads/projets/hdoc/optim_to_hdoc/re/screen1.png/screen1.png"
alt=""/>
<img src="optim//home/ivan/Downloads/projets/hdoc/optim_to_hdoc/re/screen2.png/screen2.png"
alt=""/>
<img src="./re/screen1.png/screen1.png" alt=""/>
<img src="./re/screen2.png/screen2.png" alt=""/>
</div>
</section>
......@@ -49,7 +47,7 @@
<div>
<h6>Code </h6>
<p>
<a href="optim//home/ivan/Downloads/projets/hdoc/optim_to_hdoc/re/hdoc_converter.zip/hdoc_converter.zip">hdoc_converter.zip</a>
<a href="./re/hdoc_converter.zip/hdoc_converter.zip">hdoc_converter.zip</a>
</p>
</div>
......
<?xml version="1.0" encoding="UTF-8"?>
<sc:item xmlns:sc="http://www.utc.fr/ics/scenari/v3/core">
<of:gallery xmlns:of="scpf.org:office"
xmlns:sp="http://www.utc.fr/ics/scenari/v3/primitive">
<of:galleryM>
<sp:title>Hdoc Converter Portal (v0.2) Demo</sp:title>
</of:galleryM>
<sp:img xmlns="http://www.utc.fr/ics/hdoc/xhtml"
role="ref"
sc:refUri="/home/ivan/Downloads/projets/hdoc/optim_to_hdoc/re/screen1.png"/>
<sp:img xmlns="http://www.utc.fr/ics/hdoc/xhtml"
role="ref"
sc:refUri="/home/ivan/Downloads/projets/hdoc/optim_to_hdoc/re/screen2.png"/>
</of:gallery>
</sc:item>
......@@ -36,10 +36,10 @@
</of:galleryM>
<sp:img xmlns="http://www.utc.fr/ics/hdoc/xhtml"
role="ref"
sc:refUri="/home/ivan/Downloads/projets/hdoc/optim_to_hdoc/re/screen1.png"/>
sc:refUri="./re/screen1.png"/>
<sp:img xmlns="http://www.utc.fr/ics/hdoc/xhtml"
role="ref"
sc:refUri="/home/ivan/Downloads/projets/hdoc/optim_to_hdoc/re/screen2.png"/>
sc:refUri="./re/screen2.png"/>
</of:gallery>
</of:fragment>
</sp:content>
......@@ -61,7 +61,7 @@
<of:flow>
<sp:txt>
<of:txt>
<sc:para xml:space="preserve" sc:id="t42"><!--sc:uLink src = /home/ivan/Downloads/projets/hdoc/optim_to_hdoc/ refUri = re/hdoc_converter.zip--><sc:uLink xmlns="http://www.utc.fr/ics/hdoc/xhtml" role="ref" sc:refUri="/home/ivan/Downloads/projets/hdoc/optim_to_hdoc/re/hdoc_converter.zip">hdoc_converter.zip</sc:uLink></sc:para>
<sc:para xml:space="preserve" sc:id="t42"><!--sc:uLink src = ./ refUri = re/hdoc_converter.zip--><sc:uLink xmlns="http://www.utc.fr/ics/hdoc/xhtml" role="ref" sc:refUri="./re/hdoc_converter.zip">hdoc_converter.zip</sc:uLink></sc:para>
</of:txt>
</sp:txt>
</of:flow>
......
......@@ -364,8 +364,8 @@
<xsl:with-param name="value" select="$src" />
</xsl:call-template>
</xsl:param>
<!--<img src="optim/{$src}/{$fileName}" alt="{$alt}"/>-->
<img src="optim/{$src}/{$fileName}" alt="{$alt}"/>
<!--<img src="{$src}/{$fileName}" alt="{$alt}"/>-->
<img src="{$src}/{$fileName}" alt="{$alt}"/>
</xsl:template>
<xsl:template name="parseUriImgHref">
......@@ -378,7 +378,7 @@
</xsl:call-template>
</xsl:param>
<!--<a href="optim/{$src}"><xsl:value-of select="$alt"/></a>-->
<a href="optim/{$src}/{$fileName}"><xsl:value-of select="$alt"/></a>
<a href="{$src}/{$fileName}"><xsl:value-of select="$alt"/></a>
</xsl:template>
<xsl:template name="parseUriAudio">
......@@ -390,7 +390,7 @@
</xsl:call-template>
</xsl:param>
<!--<audio src="optim/{$src}" />-->
<audio src="optim/{$src}/{$fileName}" />
<audio src="{$src}/{$fileName}" />
</xsl:template>
<xsl:template name="parseUriAudioHref">
......@@ -403,7 +403,7 @@
</xsl:call-template>
</xsl:param>
<!--<a href="optim/{$src}" ><xsl:value-of select="$alt"/></a>-->
<a href="optim/{$src}/{$fileName}" ><xsl:value-of select="$alt"/></a>
<a href="{$src}/{$fileName}" ><xsl:value-of select="$alt"/></a>
</xsl:template>
<xsl:template name="parseUriOdg">
......@@ -415,7 +415,7 @@
</xsl:call-template>
</xsl:param>
<!--<object type="application/vnd.oasis.opendocument.graphics " data="optim/{$src}"/>-->
<object type="application/vnd.oasis.opendocument.graphics " data="optim/{$src}/{$fileName}"/>
<object type="application/vnd.oasis.opendocument.graphics " data="{$src}/{$fileName}"/>
</xsl:template>
<xsl:template name="parseUriOdgHref">
......@@ -428,7 +428,7 @@
</xsl:call-template>
</xsl:param>
<!--<a href="optim/{$src}"><xsl:value-of select="$alt"/></a>-->
<a href="optim/{$src}/{$fileName}"><xsl:value-of select="$alt"/></a>
<a href="{$src}/{$fileName}"><xsl:value-of select="$alt"/></a>
</xsl:template>
<xsl:template name="parseUriOds">
......@@ -440,7 +440,7 @@
</xsl:call-template>
</xsl:param>
<!--<object type="application/vnd.oasis.opendocument.spreadsheet" data="optim/{$src}"/>-->
<object type="application/vnd.oasis.opendocument.spreadsheet" data="optim/{$src}/{$fileName}"/>
<object type="application/vnd.oasis.opendocument.spreadsheet" data="{$src}/{$fileName}"/>
</xsl:template>
<xsl:template name="parseUriOdsHref">
......@@ -453,7 +453,7 @@
</xsl:call-template>
</xsl:param>
<!--<a href="optim/{$src}"><xsl:value-of select="$alt"/></a>-->
<a href="optim/{$src}/{$fileName}"><xsl:value-of select="$alt"/></a>
<a href="{$src}/{$fileName}"><xsl:value-of select="$alt"/></a>
</xsl:template>
<xsl:template name="eventList" match="of:eventList">
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment