Commit c690320e authored by Baptiste Montange's avatar Baptiste Montange
Browse files

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

parents 93ba4a5d 1e02a0cc
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." default="default">
<property name="module" value="default"/>
<property name="in" location="${basedir}/input"/>
<property name="out" value="${basedir}/output"/>
<property name="resultFile" value="${basedir}/output"/>
<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>
<antcall target="conversion"/>
<echo>----------------------------End of conversion----------------------------------</echo>
</target>
<target depends="ifOSWindows, ifOSUnix" name="conversion"/>
<condition property="isOSUnix">
<os family="unix" />
</condition>
<condition property="isOSWindows">
<os family="windows" />
</condition>
<!-- if the OS is windows call the target run.script.windows -->
<target name="ifOSWindows" if="isOSWindows">
<echo>is Windows........</echo>
<echo>InputPath : ${inputPath}</echo>
<if>
<isset property="inputPath"/>
<then>
<antcall target="conversion.windows.input-path"/>
</then>
<else>
<antcall target="conversion.windows.no-input-path"/>
</else>
</if>
</target>
<!-- if the OS is not windows call the target run.script.unix-->
<target name="ifOSUnix" if="isOSUnix">
<echo>is Unix........</echo>
<echo>InputPath : ${inputPath}</echo>
<if>
<isset property="inputPath"/>
<then>
<antcall target="conversion.linux.input-path"/>
</then>
<else>
<antcall target="conversion.linux.no-input-path"/>
</else>
</if>
</target>
<target name="conversion.windows.input-path">
<basename property="filename" file="${inputPath}" suffix=".mm"/>
<echo>There is an input path in parameter : conversion of this file</echo>
<!-- Conversion from mm to hdoc -->
<exec dir="${basedir}/../mindmapping_to_hdoc" executable="cmd">
<arg value="${basedir}/../mindmapping_to_hdoc/run.bat"/>
<arg line="-DinputPath ./../mindmapping_to_canoprof/input/${filename}.mm"/>
</exec>
<copy file="${basedir}/../mindmapping_to_hdoc/output/${filename}.hdoc" todir="${resultFile}/hdoc"/>
<!-- Conversion from hdoc to scar -->
<!-- Files have to be copied in hdoc_to_canoprof in order to be treated -->
<copy file="${basedir}/../mindmapping_to_hdoc/output/${filename}.hdoc" todir="${basedir}/../hdoc_to_canoprof/input"/>
<exec dir="${basedir}/../hdoc_to_canoprof" executable="cmd">
<arg value="${basedir}/../hdoc_to_canoprof/run.bat"/>
</exec>
<copy todir="${resultFile}/scar/${filename}">
<fileset dir="${basedir}/../hdoc_to_canoprof/output/${filename}"/>
</copy>
</target>
<target name="conversion.windows.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"/>
<!-- Conversion from mm to hdoc -->
<!-- Conversion script is call with the file in parameter (no copy of files in minmapping_to_hdoc) -->
<exec dir="${basedir}/../mindmapping_to_hdoc" executable="cmd">
<arg value="${basedir}/../mindmapping_to_hdoc/run.bat"/>
<arg line="-DinputPath ./../mindmapping_to_canoprof/input/${filename}.mm"/>
</exec>
<property name="filename" value="${filename}"/>
<copy file="${basedir}/../mindmapping_to_hdoc/output/${filename}.hdoc" todir="${resultFile}/hdoc"/>
<!-- Conversion from hdoc to scar -->
<!-- Files have to be copied in hdoc_to_canoprof in order to be treated -->
<copy file="${basedir}/../mindmapping_to_hdoc/output/${filename}.hdoc" todir="${basedir}/../hdoc_to_canoprof/input"/>
<exec dir="${basedir}/../hdoc_to_canoprof" executable="cmd">
<arg value="${basedir}/../hdoc_to_canoprof/run.bat"/>
</exec>
<copy todir="${resultFile}/scar/${filename}">
<fileset dir="${basedir}/../hdoc_to_canoprof/output/${filename}"/>
</copy>
</sequential>
</for>
</target>
<target name="conversion.linux.input-path">
<basename property="filename" file="${inputPath}" suffix=".mm"/>
<echo>There is an input path in parameter : conversion of the file ${inputPath}</echo>
<!-- Conversion from mm to hdoc -->
<exec dir="${basedir}/../mindmapping_to_hdoc" executable="/bin/sh">
<arg value="${basedir}/../mindmapping_to_hdoc/run.sh"/>
<arg line="-DinputPath ./../mindmapping_to_canoprof/input/${filename}.mm"/>
</exec>
<copy file="${basedir}/../mindmapping_to_hdoc/output/${filename}.hdoc" todir="${resultFile}/hdoc"/>
<!-- Conversion from hdoc to scar -->
<!-- Files have to be copied in hdoc_to_canoprof in order to be treated -->
<copy file="${basedir}/../mindmapping_to_hdoc/output/${filename}.hdoc" todir="${basedir}/../hdoc_to_canoprof/input"/>
<exec dir="${basedir}/../hdoc_to_canoprof" executable="/bin/sh">
<arg value="${basedir}/../hdoc_to_canoprof/run.sh"/>
</exec>
<copy todir="${resultFile}/scar/${filename}">
<fileset dir="${basedir}/../hdoc_to_canoprof/output/${filename}"/>
</copy>
</target>
<target name="conversion.linux.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"/>
<!-- Conversion from mm to hdoc -->
<!-- Conversion script is call with the file in parameter (no copy of files in minmapping_to_hdoc) -->
<exec dir="${basedir}/../mindmapping_to_hdoc" executable="/bin/sh">
<arg value="${basedir}/../mindmapping_to_hdoc/run.sh"/>
<arg line="-DinputPath ./../mindmapping_to_canoprof/input/${filename}.mm"/>
</exec>
<property name="filename" value="${filename}"/>
<copy file="${basedir}/../mindmapping_to_hdoc/output/${filename}.hdoc" todir="${resultFile}/hdoc"/>
<!-- Conversion from hdoc to scar -->
<!-- Files have to be copied in hdoc_to_canoprof in order to be treated -->
<copy file="${basedir}/../mindmapping_to_hdoc/output/${filename}.hdoc" todir="${basedir}/../hdoc_to_canoprof/input"/>
<exec dir="${basedir}/../hdoc_to_canoprof" executable="/bin/sh">
<arg value="${basedir}/../hdoc_to_canoprof/run.sh"/>
</exec>
<copy todir="${resultFile}/scar/${filename}">
<fileset dir="${basedir}/../hdoc_to_canoprof/output/${filename}"/>
</copy>
</sequential>
</for>
</target>
<target name="preparation">
<echo>Setting up the conversion</echo>
<delete dir="${basedir}/temp"/>
<mkdir dir="${basedir}/temp"/>
<delete dir="${basedir}/output"/>
<mkdir dir="${basedir}/output"/>
<delete dir="${resultFile}/hdoc"></delete>
<mkdir dir="${resultFile}/hdoc" />
<delete dir="${resultFile}/scar"></delete>
<mkdir dir="${resultFile}/scar" />
<echo>--- End ----</echo>
</target>
</project>
i'm here to keep the output file
@echo off
set lib=lib
set ant=mindmapping_to_canoprof.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%
\ No newline at end of file
#!/bin/sh
lib="lib"
ant="mindmapping_to_canoprof.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 [ -z "$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
<map version="1.0.1">
<node ID="ID_1" TEXT="Framindmap To Canoprof">
<node ID="ID_5" POSITION="right" STYLE="fork" TEXT="#2 S&#233;ance 2">
<node ID="ID_6" POSITION="right" STYLE="fork" TEXT="#def D&#233;finition titre">
<node ID="ID_13" POSITION="right" STYLE="fork" TEXT="#p Definition contenu"/>
</node>
<node ID="ID_20" POSITION="right" STYLE="fork" TEXT="#ex Exemple titre">
<node ID="ID_27" POSITION="right" STYLE="fork" TEXT="#p Exemple contenu : En recherche du moyen de mettre tout les types de contenus similaires &#224; d&#233;finition dans le m&#234;me template"/>
</node>
</node>
<node ID="ID_4" POSITION="left" STYLE="fork" TEXT="#1 S&#233;ance 1">
<node ID="ID_29" POSITION="left" STYLE="fork" TEXT="#p Ici probl&#232;me, l'activit&#233; cr&#233;&#233;e devrait &#234;tre de type description courte"/>
</node>
</node>
</map>
\ No newline at end of file
......@@ -67,6 +67,7 @@ You can use special rules in Freemind to personnalize your Scenari Module :
* **#question** : a MCQ
* **#singlechoicequestion** : a QCU
* **#choice-qcu** : an answer within a QCU
* **#list** : a list inside a paragraph, first node being the title and children being the content.
* **#solution** : a solution associated to a single choice within a QCU (matches an integer)
* **#choice-correct** : a correct answer within a MCQ
* **#choice-incorrect** : an incorrect answer within a MCQ
......
Converter hdoc_to_neo4j
-----------------------
The purpose of this converter is to obtain a file of Neo4j requests from .scar format.
License GPL3.0
--------------
http://www.gnu.org/licenses/gpl-3.0.txt
Credits
-------
* Alié Félix
* Routier Clément
Dependance
----------
This project can be used alone if you only want to convert a .scar into a Neo4j requests file or directly insert data in neo4j local database.
User documentation
------------------
You have to respect the following steps :
1 - Placer un ou plusieurs archives (format scar) dans le dossier input
2 - Modifier le fichier config.json (dans le dossier ../hdoc_to_neo4j/node) avec la base de données locale et le mot de passe personnel (base publique à venir)
3 - Lancer le fichier runWithNode (choisissez l'extension selon votre OS)
4 - Admirez le graph créé avec neo4j dans votre navigateur (sur localhost:7474)
Unsupported
-----------
Known bugs
----------
Todo
----
Technical notes
---------------
Capitalisation
--------------
\ No newline at end of file
......@@ -60,6 +60,7 @@
<value>explanation-choice-incorrect</value>
<value>openQuestion</value>
<value>hint</value>
<value>gapText</value>
</choice>
</attribute>
</optional>
......
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