Commit 794dc845 authored by Ivan D'halluin's avatar Ivan D'halluin
Browse files

Merge branch 'master' of gitlab.utc.fr:crozatst/hdoc

parents 9c772450 f00cf78f
......@@ -29,6 +29,7 @@
<xsl:apply-templates select="h:img"/>
<xsl:apply-templates select="h:object"/>
<xsl:apply-templates select="h:audio"/>
<xsl:apply-templates select="h:video"/>
</xsl:template>
<xsl:template match="h:img">
......@@ -45,6 +46,11 @@
<xsl:variable name="src" select="@src"/>
<copy file="hdoc/{$src}" tofile="result/{$src}"/>
</xsl:template>
<xsl:template match="h:video">
<xsl:variable name="src" select="@src"/>
<copy file="hdoc/{$src}" tofile="result/{$src}"/>
</xsl:template>
</xsl:stylesheet>
......
......@@ -294,5 +294,11 @@
<xsl:variable name="src" select="@src"/>
<sc:extBlock role="anim" sc:refUri="{$src}"/>
</xsl:template>
<!--Video-->
<xsl:template match="h:video">
<xsl:variable name="src" select="@src"/>
<sc:extBlock role="anim" sc:refUri="{$src}"/>
</xsl:template>
</xsl:stylesheet>
\ No newline at end of file
......@@ -30,11 +30,8 @@
<target name="buildOutput" depends="unzipSource">
<<<<<<< HEAD
<xslt classpath="${libdir}/saxon9he.jar" style="${xsldir}/lexique_to_hdoc.xsl" basedir="${srcdir}" destdir="${outdir}" followsymlinks="false" extension=".xml">
=======
<xslt classpath="${libdir}/saxon9he.jar" style="${xsldir}/lexique_to_hdoc.xsl.xsl" basedir="${srcdir}" destdir="${outdir}" followsymlinks="false" extension=".xml">
>>>>>>> e6164602e4169b2cb7eaf6215434ae0ed8be47a3
<include name="**/*.term"/>
</xslt>
<!--<jing rngfile="${rngdir}/op_glos.rng">
......@@ -47,10 +44,7 @@
TODO rajouter le container.xml dans le fichier META-INF et qui pointe sur le fichier transformé : un mkdir avec les inputs à transformer en parametre?-->
<target name="exportOutput" depends="buildOutput">
<copy file="mimetype" tofile="${outdir}/mimetype"></copy>
<<<<<<< HEAD
<copydir src="META-INF" dest="${OutputPath}/hdoc-${nameInputsId}"></copydir>
=======
>>>>>>> e6164602e4169b2cb7eaf6215434ae0ed8be47a3
<copydir src="${outdir}/${nameInputsId}" dest="${OutputPath}/hdoc-${nameInputsId}"></copydir>
<!--<zip basedir="${outdir}" destfile="${OutputPath}/opale-${nameInputsId}" encoding="UTF-8"></zip>-->
</target>
......
......@@ -47,6 +47,10 @@
TODO rajouter le container.xml dans le fichier META-INF et qui pointe sur le fichier transformé : un mkdir avec les inputs à transformer en parametre?-->
<target name="exportOutput" depends="buildOutput">
<copy file="mimetype" tofile="${outdir}/mimetype"></copy>
<<<<<<< HEAD
<copydir src="META-INF" dest="${OutputPath}/hdoc-${nameInputsId}"></copydir>
=======
>>>>>>> e6164602e4169b2cb7eaf6215434ae0ed8be47a3
<copydir src="${outdir}/${nameInputsId}" dest="${OutputPath}/hdoc-${nameInputsId}"></copydir>
<!--<zip basedir="${outdir}" destfile="${OutputPath}/opale-${nameInputsId}" encoding="UTF-8"></zip>-->
</target>
......
Mindmapping to HDOC
===================
Projet de conversion du format Freemind vers hdoc.
Conversion of Freemind file(s) (.mm) to Hdoc
# How to use the converter
Use a terminal and go to the root of the folder (mindmapping_to_hdoc).
#1 : You want to convert SEVERAL Freemind files in Hdoc
- Put your files in a folder mindmapping_to_hdoc/input
- Enter the command line corresponding to your OS :
- On Linux : sh run.sh
- On Windows : run.bat
#2 : You want to convert ONE specific freemindFile in Hdoc
- Put your file in a folder mindmapping_to_hdoc/input
- Enter the command line corresponding to your OS :
- On Linux : sh run.sh -DinputPath input/<yourFilename>
- On Windows : run.bat -DinputPath input/<yourFilename>
You will find the result in the folder mindmapping_to_hdoc/result
<?xml version="1.0" encoding="UTF-8" standalone="no"?><map version="0.8.1"><node CREATED="1450641851216" ID="2nngtspni6hi1484pfec44c8lk" MODIFIED="1450641851216" TEXT="MindMapping"><node CREATED="1450641851217" ID="00lp6bpfm6jibhcjrpdonrhoqb" MODIFIED="1450641851217" POSITION="right" TEXT="#1 MindMapping to Hdoc"><node CREATED="1450641851217" ID="3qm1jgu7dfgs328jthlek5fd4e" MODIFIED="1450641851217" TEXT="Prendre en main le projet existant"/><node CREATED="1450641851217" ID="0u38ectmhqqp4p08p5guvgij71" MODIFIED="1450641851217" TEXT="Corriger les bugs existants"/><node CREATED="1450641851217" ID="3b1t9o2te6enh59j4iv48f4mdi" MODIFIED="1450641851217" TEXT="Restructurer le ant"/></node><node CREATED="1450641851217" ID="6lohsep5crh5g3ngj8ld8loei6" MODIFIED="1450641851217" POSITION="right" TEXT="#2 MindMapping to Opale"><node CREATED="1450641851217" ID="5pl3210hq6if3nv7r2chtjstmo" MODIFIED="1450641851217" TEXT="Faire la connexion avec le transformateur Hdoc to Opale"/><node CREATED="1450641851217" ID="3haa2fgohe9j4n04ilddco84uh" MODIFIED="1450641851217" TEXT="Permettre la personnalisation de l'organisation du module"><node CREATED="1450641851217" ID="4ie264076qt3tnlu0pqpp1dh1p" MODIFIED="1450641851217" TEXT="A l'aide de hashtag"/><node CREATED="1450641851217" ID="23mafrh60fmdmkjsp1jdg6c58g" MODIFIED="1450641851217" TEXT="A l'aide d'attributs"/></node><node CREATED="1450641851217" ID="11k2hbkcu415e1mgk5c5ucr48k" MODIFIED="1450641851217" TEXT="Permettre la personnalisation dy type de noeud (Intro, conclusion etc.)"><node CREATED="1450641851217" ID="5pf0idbv9nln725d14rs1c1p0a" MODIFIED="1450641851217" TEXT="A l'aide d'attributs"/><node CREATED="1450641851217" ID="48799q1i5c6rns3smpa8vnekfb" MODIFIED="1450641851217" TEXT="A l'aide de hashtag"/></node><node CREATED="1450641851217" ID="4npf8jpvak3lffn9c1rsogi0sq" MODIFIED="1450641851217" TEXT="Permettre la personnalisation grâce aux couleurs/icônes"/></node><node CREATED="1450641851217" ID="3n8v43p8qb005puq3qiv7aiubc" MODIFIED="1450641851217" POSITION="right" TEXT="#3 MindMapping to Optim"><node CREATED="1450641851217" ID="2bn1la3apnjf1fi8qqfqde226t" MODIFIED="1450641851217" TEXT="Faire la connexion avec le transformateur Hdoc to Optim"/></node><node CREATED="1450641851217" ID="3s00si3hquol4pldg7lo9opjd6" MODIFIED="1450641851217" POSITION="right" TEXT="#4 MindMapping to Lexique"><node CREATED="1450641851217" ID="37jlfl25iuaoe6f2cpiv30qksd" MODIFIED="1450641851217" TEXT="Faire la connexion avec le transformateur Hdoc to Lexique"/></node><node CREATED="1450641851217" ID="27gnl6pgottjfiukpa3ulfdjrj" MODIFIED="1450641851217" POSITION="left" TEXT="#5 Prendre d'autres outils de carte mentales en entrée"/><node CREATED="1450641851217" ID="24d41nnnnvvu7fv5m8m4vegu0g" MODIFIED="1450641851217" POSITION="left" TEXT="#intro This converter aims at convert a given MindMapping file into a Hdoc file which then will be imported in Opale (advanced only)."/><node CREATED="1450641851217" ID="6a7pr2b5vvmq6na5964dhf9e13" MODIFIED="1450641851217" POSITION="left" TEXT="#conclu DONE : MindMapping to Hdoc, MindMapping to Opale TODO : MindMapping to Optim, MindMapping to Lexique"/></node></map>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." default="default" >
<project basedir="." default="default">
<property name="in" location="${basedir}/input"/>
<property name="out" value="${basedir}/result"/>
<property name="module" value="default"/>
<!--
only for the debug
<property name="inputPath" value="test.mm"></property>
<property name="outputPath" value="content.xml"/>
<property name="converting" value="yes"/>
-->
<property name="resultFile" value="${basedir}/result"/>
<taskdef resource="net/sf/antcontrib/antlib.xml">
<classpath>
<pathelement location="${basedir}/lib/ant-contrib.jar"/>
</classpath>
</taskdef>
<taskdef resource="net/sf/antcontrib/antcontrib.properties">
<classpath>
<pathelement location="${basedir}/lib/ant-contrib.jar"/>
</classpath>
</taskdef>
<target name="default" depends="preparation">
<echo>----------------------------Begin of conversion----------------------------------</echo>
<!-- Sect Schema : only sect element -->
<antcall target="Makehdoc">
<param name="myXSLT" value="sect.xsl"/>
<param name="hdocName" value="sect"/>
</antcall>
<!-- For debug purposes <delete dir="${basedir}/temp"/> -->
<echo>----------------------------Begin of
conversion----------------------------------</echo>
<antcall target="hdoc_conversion"/>
<echo>----------------------------End of conversion----------------------------------</echo>
</target>
<target name="preparation">
<echo>Setting up the conversion</echo>
<delete dir="${basedir}/temp"></delete>
<mkdir dir="${basedir}/temp" />
<delete dir="${resultFile}/hdoc"></delete>
<mkdir dir="${resultFile}/hdoc" />
<!--<condition>
<equals arg1="${foo}" arg2=""/>
</condition> -->
<!-- //delete temp -->
<delete dir="${basedir}/temp"/>
<mkdir dir="${basedir}/temp"/>
<delete dir="${basedir}/result"/>
<mkdir dir="${basedir}/result"/>
<echo>--- End ----</echo>
</target>
<target name="hdoc_conversion">
<echo>InputPath : ${inputPath}</echo>
<if>
<isset property="inputPath"/>
<then>
<antcall target="hdoc_conversion.input-path"/>
</then>
<else>
<antcall target="hdoc_conversion.no-input-path"/>
</else>
</if>
</target>
<target name="hdoc_conversion.input-path">
<echo>There is an input path in parameter : conversion of the file ${inputPath}</echo>
<basename property="filename" file="${inputPath}" suffix=".mm"/>
<echo>filename ${filename}</echo>
<antcall target="Makehdoc">
<param name="myXSLT" value="sect.xsl"/>
<param name="hdocName" value="${filename}"/>
<param name="InputPath" value="${inputPath}"/>
</antcall>
</target>
<target name="hdoc_conversion.no-input-path">
<echo>There is no input path in parameter : conversion of all the files in ./input</echo>
<for param="inputFile">
<path>
<fileset dir="${in}" includes="**/*.mm"/>
</path>
<sequential>
<local name="filename"/>
<basename property="filename" file="@{inputFile}" suffix=".mm"/>
<antcall target="Makehdoc">
<param name="myXSLT" value="sect.xsl"/>
<param name="hdocName" value="${filename}"/>
<param name="inputPath" value="input/${filename}.mm"/>
</antcall>
<property name="filename" value="${filename}"/>
</sequential>
</for>
</target>
<!-- Convert a mindMap file into a hdoc, with a xsl schema specified in the parameter -->
<target name="Makehdoc" >
<target name="Makehdoc">
<echo>Begin data conversion</echo>
<mkdir dir="${basedir}/temp/${hdocName}"/>
<mkdir dir="${basedir}/temp/${hdocName}/META-INF"/>
<copy file="${basedir}/mimetype" tofile="${basedir}/temp/${hdocName}/mimetype"/>
<!-- create the container file with an XSLT transformation -->
<xslt classpath="lib/saxon9he.jar" in="${basedir}/${inputPath}" out="${basedir}/temp/${hdocName}/META-INF/container.xml" xslresource="${basedir}/xslt/makeContainer.xsl"/>
<xslt classpath="lib/saxon9he.jar" in="${basedir}/${inputPath}"
out="${basedir}/temp/${hdocName}/META-INF/container.xml"
xslresource="${basedir}/xslt/makeContainer.xsl"/>
<!-- create the file which contains the freemind data converted-->
<xslt classpath="lib/saxon9he.jar" in="${basedir}/${inputPath}" out="${basedir}/temp/${hdocName}/content.xml" xslresource="${basedir}/xslt/${myXSLT}"/>
<xslt classpath="lib/saxon9he.jar" in="${basedir}/${inputPath}"
out="${basedir}/temp/${hdocName}/content.xml" xslresource="${basedir}/xslt/${myXSLT}"/>
<!-- zipping files as the hdoc format -->
<zip destfile="${resultFile}/hdoc/${hdocName}.hdoc"
basedir="${basedir}/temp/${hdocName}"/>
<zip destfile="${resultFile}/${hdocName}.hdoc" basedir="${basedir}/temp/${hdocName}"/>
<!-- </condition> -->
<echo>end data conversion</echo>
</target>
</project>
</project>
<?xml version="1.0" encoding="UTF-8"?><?oxygen RNGSchema="http://scenari.utc.fr/hdoc/schemas/container/hdoc1-container.rng" type="xml"
?><container xmlns="urn:utc.fr:ics:hdoc:container" version="1.0"><rootfiles><rootfile full-path="content.xml" media-type="text/xml"/></rootfiles></container>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<?oxygen RNGSchema="http://hdoc.crzt.fr/schemas/xhtml/hdoc1-xhtml.rng" type="xml"
?>
<html xmlns="http://www.utc.fr/ics/hdoc/xhtml"
xmlns:utc="http://www.utc.fr/ics/hdoc/xhtml"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<head>
<title>MindMapping</title>
<meta charset="utf-8"/>
<meta name="author" content=""/>
</head>
<body>
<section>
<header>
<h1>MindMapping</h1>
<div data-hdoc-type="introduction">This converter aims at convert a given MindMapping file into a Hdoc file which then will be imported in Opale (advanced only).</div>
</header>
<section>
<header>
<h1>MindMapping to Hdoc</h1>
</header>
<section data-hdoc-type="unit-of-content">
<header>
<h1>Prendre en main le projet existant</h1>
</header>
</section>
<section data-hdoc-type="unit-of-content">
<header>
<h1>Corriger les bugs existants</h1>
</header>
</section>
<section data-hdoc-type="unit-of-content">
<header>
<h1>Restructurer le ant</h1>
</header>
</section>
<footer/>
</section>
<section>
<header>
<h1>MindMapping to Opale</h1>
</header>
<section data-hdoc-type="unit-of-content">
<header>
<h1>Faire la connexion avec le transformateur Hdoc to Opale</h1>
</header>
</section>
<section data-hdoc-type="unit-of-content">
<header>
<h1>Permettre la personnalisation de l'organisation du module</h1>
</header>
</section>
<section data-hdoc-type="unit-of-content">
<header>
<h1>Permettre la personnalisation dy type de noeud (Intro, conclusion etc.)</h1>
</header>
</section>
<section data-hdoc-type="unit-of-content">
<header>
<h1>Permettre la personnalisation grâce aux couleurs/icônes</h1>
</header>
</section>
<footer/>
</section>
<section>
<header>
<h1>MindMapping to Optim</h1>
</header>
<section data-hdoc-type="unit-of-content">
<header>
<h1>Faire la connexion avec le transformateur Hdoc to Optim</h1>
</header>
</section>
<footer/>
</section>
<section>
<header>
<h1>MindMapping to Lexique</h1>
</header>
<section data-hdoc-type="unit-of-content">
<header>
<h1>Faire la connexion avec le transformateur Hdoc to Lexique</h1>
</header>
</section>
<footer/>
</section>
<section data-hdoc-type="unit-of-content">
<header>
<h1>Prendre d'autres outils de carte mentales en entrée</h1>
</header>
</section>
<footer>
<div data-hdoc-type="conclusion">Ma conclusion</div>
</footer>
</section>
</body>
</html>
<?xml version="1.0" encoding="UTF-8"?><?oxygen RNGSchema="http://scenari.utc.fr/hdoc/schemas/container/hdoc1-container.rng" type="xml"
?><container xmlns="urn:utc.fr:ics:hdoc:container" version="1.0"><rootfiles><rootfile full-path="content.xml" media-type="text/xml"/></rootfiles></container>
\ No newline at end of file
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