Commit 0bda662e authored by aperdria's avatar aperdria

Restructuration of mindmapping_to_opale to convert several files in the...

Restructuration of mindmapping_to_opale to convert several files in the meantime ; Adding run.sh and run.bat ; Modification of the readme file ;
parent 745a8dcf
<?xml version="1.0" encoding="UTF-8" standalone="no"?><map version="0.8.1"><node CREATED="1450312359766" ID="2nngtspni6hi1484pfec44c8lk" MODIFIED="1450312359766" TEXT="MindMapping"><node CREATED="1450312359766" ID="00lp6bpfm6jibhcjrpdonrhoqb" MODIFIED="1450312359766" POSITION="right" TEXT="#1 MindMapping to Hdoc"><node CREATED="1450312359766" ID="3qm1jgu7dfgs328jthlek5fd4e" MODIFIED="1450312359766" TEXT="Prendre en main le projet existant"/><node CREATED="1450312359766" ID="0u38ectmhqqp4p08p5guvgij71" MODIFIED="1450312359766" TEXT="Corriger les bugs existants"/><node CREATED="1450312359766" ID="3b1t9o2te6enh59j4iv48f4mdi" MODIFIED="1450312359766" TEXT="Restructurer le ant"/></node><node CREATED="1450312359766" ID="6lohsep5crh5g3ngj8ld8loei6" MODIFIED="1450312359766" POSITION="right" TEXT="#2 MindMapping to Opale"><node CREATED="1450312359766" ID="5pl3210hq6if3nv7r2chtjstmo" MODIFIED="1450312359766" TEXT="Faire la connexion avec le transformateur Hdoc to Opale"/><node CREATED="1450312359766" ID="3haa2fgohe9j4n04ilddco84uh" MODIFIED="1450312359766" TEXT="Permettre la personnalisation de l'organisation du module"/><node CREATED="1450312359766" ID="11k2hbkcu415e1mgk5c5ucr48k" MODIFIED="1450312359766" TEXT="Permettre la personnalisation dy type de noeud (Intro, conclusion etc.)"/><node CREATED="1450312359766" ID="4npf8jpvak3lffn9c1rsogi0sq" MODIFIED="1450312359766" TEXT="Permettre la personnalisation grâce aux couleurs/icônes"/></node><node CREATED="1450312359766" ID="3n8v43p8qb005puq3qiv7aiubc" MODIFIED="1450312359766" POSITION="right" TEXT="#3 MindMapping to Optim"><node CREATED="1450312359766" ID="2bn1la3apnjf1fi8qqfqde226t" MODIFIED="1450312359766" TEXT="Faire la connexion avec le transformateur Hdoc to Optim"/></node><node CREATED="1450312359766" ID="3s00si3hquol4pldg7lo9opjd6" MODIFIED="1450312359766" POSITION="right" TEXT="#4 MindMapping to Lexique"><node CREATED="1450312359766" ID="37jlfl25iuaoe6f2cpiv30qksd" MODIFIED="1450312359766" TEXT="Faire la connexion avec le transformateur Hdoc to Lexique"/></node><node CREATED="1450312359767" ID="27gnl6pgottjfiukpa3ulfdjrj" MODIFIED="1450312359767" POSITION="left" TEXT="#5 Prendre d'autres outils de carte mentales en entrée"/><node CREATED="1450312359767" ID="24d41nnnnvvu7fv5m8m4vegu0g" MODIFIED="1450312359767" 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="1450312359767" ID="6a7pr2b5vvmq6na5964dhf9e13" MODIFIED="1450312359767" POSITION="left" TEXT="#conclu Ma conclusion"/></node></map>
\ No newline at end of file
......@@ -2,7 +2,8 @@
<project basedir="." default="default">
<property name="in" location="${basedir}/input"/>
<property name="out" value="${basedir}/result"/>
<property name="module" value="default"/>
<property name="resultFile" value="${basedir}/result"/>
<taskdef resource="net/sf/antcontrib/antlib.xml">
<classpath>
<pathelement location="${basedir}/lib/ant-contrib.jar"/>
......@@ -13,9 +14,6 @@
<pathelement location="${basedir}/lib/ant-contrib.jar"/>
</classpath>
</taskdef>
<property name="module" value="default"/>
<property name="resultFile" value="${basedir}/result"/>
<target name="default" depends="preparation">
<echo>----------------------------Begin of
......@@ -25,10 +23,20 @@
<echo>----------------------------End of conversion----------------------------------</echo>
</target>
<target name="preparation">
<echo>Setting up the conversion</echo>
<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}"/>
<isset property="inputPath"/>
<then>
<antcall target="hdoc_conversion.input-path"/>
</then>
......@@ -39,7 +47,9 @@
</target>
<target name="hdoc_conversion.input-path">
<echo>There is an input path in parameter : conversion of this file</echo>
<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}"/>
......@@ -56,11 +66,11 @@
</path>
<sequential>
<local name="filename"/>
<basename property="filename" file="@{inputFile}"/>
<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}"/>
<param name="inputPath" value="input/${filename}.mm"/>
</antcall>
<property name="filename" value="${filename}"/>
</sequential>
......@@ -68,19 +78,6 @@
</target>
<!--<target name="hdoc_conversion" depends="hdoc_conversion.input-path, hdoc_conversion.no-input-path" />
-->
<target name="preparation">
<echo>Setting up the conversion</echo>
<delete dir="${basedir}/temp"/>
<mkdir dir="${basedir}/temp"/>
<delete dir="${basedir}/result"/>
<mkdir dir="${basedir}/result"/>
<echo>--- End ----</echo>
</target>
<!-- Convert a mindMap file into a hdoc, with a xsl schema specified in the parameter -->
<target name="Makehdoc">
<echo>Begin data conversion</echo>
......
<?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
<?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>Compte rendu reunion</title>
<meta charset="utf-8"/>
<meta name="author" content=""/>
</head>
<body>
<section>
<header>
<h1>Compte rendu reunion</h1>
</header>
<section>
<header>
<h1>Avancé du travail</h1>
</header>
<section data-hdoc-type="unit-of-content">
<header>
<h1>Amélioration du rendement</h1>
</header>
</section>
<section data-hdoc-type="unit-of-content">
<header>
<h1>Création d'un nouveau systeme de paiement</h1>
</header>
</section>
<footer/>
</section>
<section>
<header>
<h1>Résultat courrant</h1>
</header>
<section data-hdoc-type="unit-of-content">
<header>
<h1>70% du travail fait</h1>
</header>
</section>
<footer/>
</section>
<section>
<header>
<h1>Rappel du travail à realiser</h1>
</header>
<section>
<header>
<h1>Changement du process de relation client</h1>
</header>
<section data-hdoc-type="unit-of-content">
<header>
<h1>Formation</h1>
</header>
</section>
<section data-hdoc-type="unit-of-content">
<header>
<h1>Sondage clientèle</h1>
</header>
</section>
<footer/>
</section>
<section data-hdoc-type="unit-of-content">
<header>
<h1>Trouver de nouveaux client d'ici la fin de l'année</h1>
</header>
</section>
<footer/>
</section>
<footer/>
</section>
</body>
</html>
......@@ -2,10 +2,13 @@
set lib=lib
set ant=mindmapping_to_hdoc.ant
set antparam=-Dprogram.param=%1
set inputPath=%2
set scJarList=%lib%\*
java.exe -classpath "%scJarList%" -Xmx150m org.apache.tools.ant.Main -buildfile %ant% %antparam%
if defined %inputPath% java.exe -classpath "%scJarList%" -Xmx150m org.apache.tools.ant.Main -buildfile %ant% %antparam% -DinputPath %inputPath%
pause
if not defined %inputPath% java.exe -classpath "%scJarList%" -Xmx150m org.apache.tools.ant.Main -buildfile %ant% %antparam%
pause
REM start /MIN java.exe -classpath "%scJarList%" -Xmx150m org.apache.tools.ant.Main -buildfile %ant% %antparam%
......@@ -2,6 +2,7 @@
lib="lib"
ant="mindmapping_to_hdoc.ant"
antparam="-Dprogram.param=$1"
inputPath="$2"
#Recherche de java et controle que se soit une version SUN
vJavaCmd="java"
......@@ -31,5 +32,10 @@ fi
#Lancer la commande
scJarList="$lib/*"
$vJavaCmd -classpath "$scJarList:" -Xmx150m org.apache.tools.ant.Main -buildfile $ant $antparam
if [ "$inputPath" == '' ] ; then
echo "Appel sans paramètre"
$vJavaCmd -classpath "$scJarList:" -Xmx150m org.apache.tools.ant.Main -buildfile $ant $antparam
else
echo "Appel avec paramètre"
$vJavaCmd -classpath "$scJarList:" -Xmx150m org.apache.tools.ant.Main -buildfile $ant $antparam -DinputPath $inputPath
fi
\ No newline at end of file
Mindmapping to HDOC
===================
Conversion of Freemind file(s) (.mm) to Opale
# How to use the converter
Use a terminal and go to the root of the folder (mindmapping_to_opale).
#1 : You want to convert SEVERAL Freemind files in Opale
- Put your files in a folder mindmapping_to_opale/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 Opale
- Put your file in a folder mindmapping_to_opale/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_opale/result
<?xml version="1.0" encoding="UTF-8" standalone="no"?><map version="0.8.1"><node CREATED="1450312359766" ID="2nngtspni6hi1484pfec44c8lk" MODIFIED="1450312359766" TEXT="MindMapping"></node></map>
\ No newline at end of file
# how to use the converter
#1 : you want to convert your freemindFile in Opale
- put your freemind file in the mindmapping_to_opale
- enter the command line :
- linux : ant -buildfile mindmapping_to_opale.ant -DinputPath <yourFilename>
- windows : C:\ant\bin\ant -buildfile mindmapping_to_opale.ant -DinputPath <yourFilename>
you will find the result in the folder result/opale
@echo off
set lib=lib
set ant=mindmapping_to_opale.ant
set antparam=-Dprogram.param=%1
set scJarList=%lib%\*
java.exe -classpath "%scJarList%" -Xmx150m org.apache.tools.ant.Main -buildfile %ant% %antparam%
pause
REM start /MIN java.exe -classpath "%scJarList%" -Xmx150m org.apache.tools.ant.Main -buildfile %ant% %antparam%
#!/bin/sh
lib="lib"
ant="mindmapping_to_opale.ant"
antparam="-Dprogram.param=$1"
inputPath="$2"
#Recherche de java et controle que se soit une version SUN
vJavaCmd="java"
xCheckJava () {
vInputVarName=\$"$1"
vInputVarVal=`eval "expr \"$vInputVarName\" "`
if [ -z "$vInputVarVal" ];then
eval "$1=false"
return
fi
vSunJavaFound=`$vInputVarVal -version 2>&1 | grep -Eo -m 1 "(HotSpot)|(OpenJDK)"`
if [ "$vSunJavaFound" != "HotSpot" ] && [ "$vSunJavaFound" != "OpenJDK" ] ; then
eval "$1=false"
return
fi
}
xCheckJava vJavaCmd
if [ "$vJavaCmd" = "false" ]; then
vJavaCmd="$JAVA_HOME/bin/java"
xCheckJava vJavaCmd
if [ "$vJavaCmd" = "false" ]; then
echo "ERREUR: JRE de SUN introuvable. Veuillez déclarer la variable d'environnement JAVA_HOME."
exit 1
fi
fi
#Lancer la commande
scJarList="$lib/*"
if [ "$inputPath" == '' ] ; then
echo "Appel sans paramètre"
$vJavaCmd -classpath "$scJarList:" -Xmx150m org.apache.tools.ant.Main -buildfile $ant $antparam
else
echo "Appel avec paramètre"
$vJavaCmd -classpath "$scJarList:" -Xmx150m org.apache.tools.ant.Main -buildfile $ant $antparam -DinputPath $inputPath
fi
\ 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