Commit caa2e203 authored by Gregory's avatar Gregory
Browse files

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

parents f194c1a3 349c6133
......@@ -41,6 +41,11 @@ If you want to convert one specific file that is in the input folder, use the pa
### Rules to follow
You can use the native formating in order to complete your Module :
* By using the "Text Bold" option, you will get an emphasis.
* By using the "Text Italic" option, you will get a quote.
You can use special rules in Freemind to personnalize your Scenari Module :
* By default, a "Division" is created with the name of the main node of your MindMap
......@@ -57,6 +62,10 @@ You can use special rules in Freemind to personnalize your Scenari Module :
* **#wrng** : a warning
* **#ex** : an example
* **#def** : a definition
* **#question** : a MCQ
* **#choice-correct** : a correct answer within a MCQ
* **#choice-incorrect** : an incorrect answer within a MCQ
* **#explanation** : an explanation of the answers within a MCQ
* *Then you can add some **#p** inside these node to create the content*
- You can arrange the order of the node usine the hashtag **#1, #2, #3** etc.
......
Converter opale_to_basex
-----------------------
The purpose of this converter is to obtain an HDOC file from an Opale document.
License GPL3.0
--------------
http://www.gnu.org/licenses/gpl-3.0.txt
Credits
-------
* Simei YIN
* Baptiste MONTANGE
Dependance
----------
In order to work properly, this module needs
1. [`opale_to_hdoc`](https://gitlab.utc.fr/crozatst/hdoc/tree/master/opale_to_hdoc) (Opale to Hdoc conversion)
2. [`hdoc_to_basex`](https://gitlab.utc.fr/crozatst/hdoc/tree/master/hdoc_to_basex) (Hdoc to Basex conversion)
User Stories
----------
Please consult the section "User Stories" of README.md file in [`hdoc_to_basex`] (https://gitlab.utc.fr/crozatst/hdoc/tree/master/hdoc_to_basex/README.md)
\ No newline at end of file
libdir=${basedir}/lib
rngdir=${basedir}/rng
xsldir=${basedir}/xsl
srcdir=${basedir}/in
outdir=${basedir}/out
InputPath=${basedir}/input
OutputPath=${basedir}/output
<project name="opale_to_basex">
<property file="build.properties"/>
<echo message="To be implemented..."/>
</project>
\ No newline at end of file
@echo off
set lib=lib
set ant=opale_to_basex.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="opale_to_basex.ant"
antparam="-Dprogram.param=$1"
#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/*"
$vJavaCmd -classpath "$scJarList:" -Xmx150m org.apache.tools.ant.Main -buildfile $ant $antparam
......@@ -149,3 +149,11 @@ The opale_to_hdoc converter transcribes an Opale publication to a hdoc format. O
The source code converter is available and can be completed in order to
improve it and manage more Opale elements.
Modified by Benoit Villain (12/12/2016)
------------------
Les divisions et les parties d'un grain n'étaient pas traitées... Contrairement à ce que mentionne le README...
J'ai donc apporté les modifications nécessaires pour que les divisions et les parties (récursives) soient bel et bien transformées en "section" hdoc.
......@@ -24,6 +24,8 @@
<copy file="{$link2}/{$name}" todir="output/hdoc/re"/>
</xsl:template>
<xsl:template match="sp:res[contains(@sc:refUri,'.xml')]"/>
<xsl:template match="*"></xsl:template>
</xsl:stylesheet>
\ No newline at end of file
......@@ -28,6 +28,16 @@
</xsl:copy>
</xsl:template>
<!-- cas d'une division (avec contenu externe) -->
<xsl:template match="op:ue/sp:div[@sc:refUri] | op:ueDiv/sp:div[@sc:refUri]">
<!-- se copie soit même -->
<xsl:copy>
<!-- avec comme contenu ce qui se trouve dans la balise sc:item du fichier distant -->
<xsl:apply-templates select="document(./@sc:refUri)/sc:item/*"/>
</xsl:copy>
</xsl:template>
<xsl:template match="sp:res[@sc:refUri]">
<sp:res sc:refUri="{resolve-uri(@sc:refUri, document-uri(/))}">
<xsl:apply-templates/>
......
This diff is collapsed.
......@@ -423,8 +423,10 @@
<xsl:template match="div[@id='toctitle']/h2" priority="1"/>
<!-- Ignoring end of file h2: see also, etc... -->
<xsl:template match="h2[not(following-sibling::p intersect following-sibling::h2[1]/preceding-sibling::p)]"/>
<!-- <xsl:template match="h2[not(following-sibling::p intersect following-sibling::h2[1]/preceding-sibling::p)]"/>-->
<xsl:template match=" h2[following-sibling::ul[li/a[@class='external text'] and preceding-sibling::h2]][last()]"/>
<xsl:template match=" h2[following-sibling::div[@class='references-small decimal'] and preceding-sibling::h2][last()]"/>
<xsl:template match="div[@id='mw-navigation']/h2"/>
<!-- Ignoring divs by default: they are not relevant to us -->
<xsl:template match="div" mode="#all"/>
......
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