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"?> <?xml version="1.0" encoding="UTF-8"?>
<project basedir="." name="myantce"> <project basedir="." name="myantce">
<taskdef resource="net/sf/antcontrib/antlib.xml"/>
<property name="in" location="${basedir}/input"/> <property name="in" location="${basedir}/input"/>
<property name="out" location="${basedir}/output"/> <property name="out" location="${basedir}/output"/>
<property name="tmp" location="${basedir}/tmp"/> <property name="tmp" location="${basedir}/tmp"/>
...@@ -19,18 +22,27 @@ ...@@ -19,18 +22,27 @@
<echo message="Extract files..."/> <echo message="Extract files..."/>
<unzip dest="${tmp}/extract"> <for param="archive">
<fileset dir="${in}"> <path>
<include name="**/*.scar"/> <fileset dir="${in}" includes="*"/>
</fileset> </path>
</unzip> <sequential>
<echo message="@{archive}"></echo>
<unzip src="@{archive}" dest="${tmp}/extract"></unzip>
</sequential>
</for>
<echo message="Internationalize files..."/> <echo message="Internationalize files..."/>
<xslt useImplicitFileset="false" destdir="${tmp}/internationalisation" style="${xsl}/internalisation.xsl"> <xslt useImplicitFileset="false" destdir="${tmp}/internationalisation" style="${xsl}/internalisation.xsl">
<param name="currentDir" expression="${basedir}"/> <param name="currentDir" expression="."/>
<fileset dir="${tmp}/extract"> <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> </fileset>
</xslt> </xslt>
...@@ -42,23 +54,26 @@ ...@@ -42,23 +54,26 @@
<copy todir="${out}"> <copy todir="${out}">
<fileset dir="${tmp}/extract"> <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> </fileset>
</copy> </copy>
<echo message="Zip result..."/> <echo message="Zip result..."/>
<antcall target="createApplicationDAA"/>
<target name="createApplicationDAA">
<for param="folder"> <for param="folder">
<path> <path>
<fileset dir="${out}/*"/> <dirset dir="${out}" includes="*"/>
</path> </path>
<sequential> <sequential>
<echo>@{folder}</echo> <local name="folder_name"/>
<zip basedir="${folder}" destfile="${folder}.zip"> <basename property="folder_name" file="@{folder}"/>
</zip> <zip destfile="${out}/${folder_name}.zip" basedir="@{folder}" ></zip>
</sequential> </sequential>
</for> </for>
</target>
</project> </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 @@ ...@@ -32,10 +32,8 @@
<h6>Hdoc Converter Portal (v0.2) Demo </h6> <h6>Hdoc Converter Portal (v0.2) Demo </h6>
<img src="optim//home/ivan/Downloads/projets/hdoc/optim_to_hdoc/re/screen1.png/screen1.png" <img src="./re/screen1.png/screen1.png" alt=""/>
alt=""/> <img src="./re/screen2.png/screen2.png" alt=""/>
<img src="optim//home/ivan/Downloads/projets/hdoc/optim_to_hdoc/re/screen2.png/screen2.png"
alt=""/>
</div> </div>
</section> </section>
...@@ -49,7 +47,7 @@ ...@@ -49,7 +47,7 @@
<div> <div>
<h6>Code </h6> <h6>Code </h6>
<p> <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> </p>
</div> </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 @@ ...@@ -36,10 +36,10 @@
</of:galleryM> </of:galleryM>
<sp:img xmlns="http://www.utc.fr/ics/hdoc/xhtml" <sp:img xmlns="http://www.utc.fr/ics/hdoc/xhtml"
role="ref" 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" <sp:img xmlns="http://www.utc.fr/ics/hdoc/xhtml"
role="ref" role="ref"
sc:refUri="/home/ivan/Downloads/projets/hdoc/optim_to_hdoc/re/screen2.png"/> sc:refUri="./re/screen2.png"/>
</of:gallery> </of:gallery>
</of:fragment> </of:fragment>
</sp:content> </sp:content>
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
<of:flow> <of:flow>
<sp:txt> <sp:txt>
<of: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> </of:txt>
</sp:txt> </sp:txt>
</of:flow> </of:flow>
......
...@@ -364,8 +364,8 @@ ...@@ -364,8 +364,8 @@
<xsl:with-param name="value" select="$src" /> <xsl:with-param name="value" select="$src" />
</xsl:call-template> </xsl:call-template>
</xsl:param> </xsl:param>
<!--<img src="optim/{$src}/{$fileName}" alt="{$alt}"/>--> <!--<img src="{$src}/{$fileName}" alt="{$alt}"/>-->
<img src="optim/{$src}/{$fileName}" alt="{$alt}"/> <img src="{$src}/{$fileName}" alt="{$alt}"/>
</xsl:template> </xsl:template>
<xsl:template name="parseUriImgHref"> <xsl:template name="parseUriImgHref">
...@@ -378,7 +378,7 @@ ...@@ -378,7 +378,7 @@
</xsl:call-template> </xsl:call-template>
</xsl:param> </xsl:param>
<!--<a href="optim/{$src}"><xsl:value-of select="$alt"/></a>--> <!--<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>
<xsl:template name="parseUriAudio"> <xsl:template name="parseUriAudio">
...@@ -390,7 +390,7 @@ ...@@ -390,7 +390,7 @@
</xsl:call-template> </xsl:call-template>
</xsl:param> </xsl:param>
<!--<audio src="optim/{$src}" />--> <!--<audio src="optim/{$src}" />-->
<audio src="optim/{$src}/{$fileName}" /> <audio src="{$src}/{$fileName}" />
</xsl:template> </xsl:template>
<xsl:template name="parseUriAudioHref"> <xsl:template name="parseUriAudioHref">
...@@ -403,7 +403,7 @@ ...@@ -403,7 +403,7 @@
</xsl:call-template> </xsl:call-template>
</xsl:param> </xsl:param>
<!--<a href="optim/{$src}" ><xsl:value-of select="$alt"/></a>--> <!--<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>
<xsl:template name="parseUriOdg"> <xsl:template name="parseUriOdg">
...@@ -415,7 +415,7 @@ ...@@ -415,7 +415,7 @@
</xsl:call-template> </xsl:call-template>
</xsl:param> </xsl:param>
<!--<object type="application/vnd.oasis.opendocument.graphics " data="optim/{$src}"/>--> <!--<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>
<xsl:template name="parseUriOdgHref"> <xsl:template name="parseUriOdgHref">
...@@ -428,7 +428,7 @@ ...@@ -428,7 +428,7 @@
</xsl:call-template> </xsl:call-template>
</xsl:param> </xsl:param>
<!--<a href="optim/{$src}"><xsl:value-of select="$alt"/></a>--> <!--<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>
<xsl:template name="parseUriOds"> <xsl:template name="parseUriOds">
...@@ -440,7 +440,7 @@ ...@@ -440,7 +440,7 @@
</xsl:call-template> </xsl:call-template>
</xsl:param> </xsl:param>
<!--<object type="application/vnd.oasis.opendocument.spreadsheet" data="optim/{$src}"/>--> <!--<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>
<xsl:template name="parseUriOdsHref"> <xsl:template name="parseUriOdsHref">
...@@ -453,7 +453,7 @@ ...@@ -453,7 +453,7 @@
</xsl:call-template> </xsl:call-template>
</xsl:param> </xsl:param>
<!--<a href="optim/{$src}"><xsl:value-of select="$alt"/></a>--> <!--<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>
<xsl:template name="eventList" match="of:eventList"> <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