Commit 5861e4f4 authored by Neveux Anais's avatar Neveux Anais

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

parents 0dad12f3 5553bcb3
*/input/* */input/*
*/tmp/* */tmp/*
*/output/* */output/*
!*/input/.gitkeep
!*/tmp/.gitkeep
!*/output/.gitkeep
*/node_modules*/ */node_modules*/
*.DS_Store* *.DS_Store*
...@@ -34,6 +34,9 @@ ...@@ -34,6 +34,9 @@
<!-- Initialize folders --> <!-- Initialize folders -->
<target name="init"> <target name="init">
<!-- create folders (to be sure) --> <!-- create folders (to be sure) -->
<delete>
<fileset file="${out}/*.hdoc"/>
</delete>
<mkdir dir="${unzipfolder}"/> <mkdir dir="${unzipfolder}"/>
<mkdir dir="${tmp}"/> <mkdir dir="${tmp}"/>
<mkdir dir="${out}"/> <mkdir dir="${out}"/>
...@@ -60,6 +63,9 @@ ...@@ -60,6 +63,9 @@
<target name="process_canoscar" depends="check_scar" if="${canoprof.is_canoprof_scar}"> <target name="process_canoscar" depends="check_scar" if="${canoprof.is_canoprof_scar}">
<!-- TODO change test.xml to the temporary file created while fusioning all the xml files --> <!-- TODO change test.xml to the temporary file created while fusioning all the xml files -->
<copy tofile="${unzipfolder}/Test.programme">
<fileset file="${unzipfolder}/*.programme"/>
</copy>
<xslt style="xsl/programmation.xsl" in="${unzipfolder}/Test.programme" out="${hdoc}/content.xml" classpath="./lib/saxon9he.jar"> <xslt style="xsl/programmation.xsl" in="${unzipfolder}/Test.programme" out="${hdoc}/content.xml" classpath="./lib/saxon9he.jar">
<factory name="net.sf.saxon.TransformerFactoryImpl"/> <factory name="net.sf.saxon.TransformerFactoryImpl"/>
</xslt> </xslt>
......
...@@ -22,31 +22,49 @@ Dependance ...@@ -22,31 +22,49 @@ Dependance
This project can be used alone if you want to import an HDOC file into basex. This project can be used alone if you want to import an HDOC file into basex.
## User stories User stories
------------------ ------------------
- Among a group of courses, user can search by title, author or keywords of the course. - Among a group of courses, user can search by title, author or keywords of the course.
- By searching a certain keyword, user can obtain the sections that contain it with their hierarchy levels in the course. - By searching a certain keyword, user can obtain the sections that contain it with their hierarchy levels in the course.
- In a certain section, by searching a key word, user can obtain paragraphes that contain it. - In a certain section, by searching a key word, user can obtain paragraphs that contain it.
- User can get definitions related to a keyword - User can get definitions related to a keyword
- User can get examples whose titles contain a keyword - User can get examples whose titles contain a keyword
Step by step : Step by step :
[Step 1 : File transformation]
- Put the files .hdoc you want to deal with in the folder [input](https://gitlab.utc.fr/crozatst/hdoc/tree/master/hdoc_to_basex/input) [`Step 1 : File transformation`]
- Put the files .hdoc you want to deal with in the folder [`input`](https://gitlab.utc.fr/crozatst/hdoc/tree/master/hdoc_to_basex/input)
- Run the transformation progam (Win : double click run.bat, Linux : execute run.sh) - Run the transformation progam (Win : double click run.bat, Linux : execute run.sh)
- This transformation includes :
* Title, authors, keywords
* First Level section : title, type, paragraphs
[Step 2 : Create data base in basex] [`Step 2 : Create data base in basex`]
- Download and install [BaseX](http://basex.org/products/download/all-downloads/) - Download and install [BaseX](http://basex.org/products/download/all-downloads/)
- Run BasexGui - Run BasexGui
- In the Text Editor of BaseX, open the command script "createbd.bxs" in folder [`basex/command`](https://gitlab.utc.fr/crozatst/hdoc/tree/master/hdoc_to_basex/basex/command). - In the Text Editor of BaseX, open the command script "createbd.bxs" in folder [`command`](https://gitlab.utc.fr/crozatst/hdoc/tree/master/hdoc_to_basex/basex/command).
Follow the instructions in the script, and then execute it. Follow the instructions in the script, and then execute it.
[Step 3 : Make XQuery request] [`Step 3 : Make XQuery request`]
- In the Text Editor of BaseX, you can open and execute xquery script "main.xq" in folder [`basex/xquery`](https://gitlab.utc.fr/crozatst/hdoc/tree/master/hdoc_to_basex/basex/xquery). - In the Text Editor of BaseX, you can open and execute xquery script "main.xq" in folder [`xquery`](https://gitlab.utc.fr/crozatst/hdoc/tree/master/hdoc_to_basex/basex/xquery).
It's in this main module that we call predefined functions and execute script It's in this main module that we call predefined functions and execute script
- .xqm files are library modules where we have defined functions, we can go to these files for more detailed using instructions - .xqm files are library modules where we have defined functions, we can go to these files for more detailed using instructions
Available library modules : Available library modules :
* searchDocByAuthor.xqm * searchDocByAuthor.xqm
* searchDocByTitle.xqm * searchDocByTitle.xqm
* searchDocByTitle.xqm * searchSectionByTitle.xqm
\ No newline at end of file
TODO List
------------------
- xlst Transformation :
* Remove text formats
* Sub sections
* Exercices
* Resources : images, ...
- XQuery requests :
* Search keywords in text
* Search sub sections by keywords in their titles
* Search exercices by keywords in their titles
\ No newline at end of file
(: this script with .xq as suffix is the main module :) (: this script with .xq as suffix is the main module :)
(: all functions defined in .xqm files (library modules) can be called here :) (: all functions defined in .xqm files (library modules) can be called here :)
import module namespace myNs = "https://gitlab.utc.fr/crozatst/hdoc/tree/master/hdoc_to_basex" at "searchSectionByTitle.xqm", "searchSectionByTitle.xqm", "searchDocByAuthor.xqm"; import module namespace myNs = "https://gitlab.utc.fr/crozatst/hdoc/tree/master/hdoc_to_basex" at "searchSectionByTitle.xqm", "searchDocByTitle.xqm", "searchDocByAuthor.xqm";
(: myNs:searchDocByTitle('^NF29_HdocEtherpad$', //document ):) (: myNs:searchDocByTitle('^NF29_HdocEtherpad$', //document ) :)
(: myNs:searchSectionByTitle('contenu', //document) :) (: myNs:searchSectionByTitle('contenu', //document) :)
(: myNs:searchDocByAuthor('montangé', //document) :) (: myNs:searchDocByAuthor('montangé', //document) :)
......
...@@ -12,9 +12,9 @@ declare function myNs:searchDocByAuthor($name as xs:string, $docs as node()*) as ...@@ -12,9 +12,9 @@ declare function myNs:searchDocByAuthor($name as xs:string, $docs as node()*) as
for $doc in $docs for $doc in $docs
return return
for $author in $doc/authors/author for $author in $doc/authors/author
let $titre := $doc/titre let $title := $doc/title
let $author_noAcc := translate($author, 'áàâäéèêëíìîïóòôöúùûüABCDEFGHIJKLMNOPQRSTUVWXYZ','aaaaeeeeiiiioooouuuuabcdefghijklmnopqrstuvwxyz') let $author_noAcc := translate($author, 'áàâäéèêëíìîïóòôöúùûüABCDEFGHIJKLMNOPQRSTUVWXYZ','aaaaeeeeiiiioooouuuuabcdefghijklmnopqrstuvwxyz')
where matches($author_noAcc, $name_noAcc) where matches($author_noAcc, $name_noAcc)
group by $titre (: Avoid duplications of documents by their titre:) group by $title (: Avoid duplications of documents by their titre:)
return $doc return $doc
}; };
\ No newline at end of file
...@@ -8,6 +8,6 @@ module namespace myNs = "https://gitlab.utc.fr/crozatst/hdoc/tree/master/hdoc_to ...@@ -8,6 +8,6 @@ module namespace myNs = "https://gitlab.utc.fr/crozatst/hdoc/tree/master/hdoc_to
declare function myNs:searchDocByTitle($name as xs:string, $docs as node()*) as node()* declare function myNs:searchDocByTitle($name as xs:string, $docs as node()*) as node()*
{ {
for $doc in $docs for $doc in $docs
where matches($doc/titre, $name, "i") where matches($doc/title, $name, "i")
return $doc return $doc
}; };
\ No newline at end of file
...@@ -12,7 +12,7 @@ declare function myNs:searchSectionByTitle($keyword as xs:string, $docs as node( ...@@ -12,7 +12,7 @@ declare function myNs:searchSectionByTitle($keyword as xs:string, $docs as node(
for $doc in $docs for $doc in $docs
return return
for $section in $doc/sections/section for $section in $doc/sections/section
let $title_noAcc := translate($section/titresection, 'áàâäéèêëíìîïóòôöúùûüABCDEFGHIJKLMNOPQRSTUVWXYZ','aaaaeeeeiiiioooouuuuabcdefghijklmnopqrstuvwxyz') let $title_noAcc := translate($section/titlesection, 'áàâäéèêëíìîïóòôöúùûüABCDEFGHIJKLMNOPQRSTUVWXYZ','aaaaeeeeiiiioooouuuuabcdefghijklmnopqrstuvwxyz')
where matches($title_noAcc, $keyword_noAcc) where matches($title_noAcc, $keyword_noAcc)
return $section return $section
}; };
\ No newline at end of file
...@@ -3,4 +3,4 @@ log=${basedir}/log ...@@ -3,4 +3,4 @@ log=${basedir}/log
xsl=${basedir}/xsl xsl=${basedir}/xsl
in=${basedir}/input in=${basedir}/input
out=${basedir}/output out=${basedir}/output
tmp=${basedir}/tmp tmp=${basedir}/tmp
\ No newline at end of file
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
</for> </for>
<!-- Clean--> <!-- Clean-->
<delete dir="${tmp}" failonerror="false"/> <!-- <delete dir="${tmp}" failonerror="false"/> -->
</target> </target>
......
...@@ -10,9 +10,9 @@ ...@@ -10,9 +10,9 @@
</xsl:template> </xsl:template>
<xsl:template match="h:head" mode="title"> <xsl:template match="h:head" mode="title">
<titre> <title>
<xsl:value-of select="./h:title"/> <xsl:value-of select="./h:title"/>
</titre> </title>
<xsl:apply-templates select="./h:meta"/> <xsl:apply-templates select="./h:meta"/>
</xsl:template> </xsl:template>
...@@ -44,29 +44,32 @@ ...@@ -44,29 +44,32 @@
<xsl:template match="h:section"> <xsl:template match="h:section">
<section> <section>
<titresection> <typesection>
<xsl:value-of select="@data-hdoc-type"/>
</typesection>
<titlesection>
<xsl:value-of select="./h:header/h:h1"/> <xsl:value-of select="./h:header/h:h1"/>
</titresection> </titlesection>
<contenu> <content>
<paragraphs>
<paragraphes>
<xsl:apply-templates select="h:div"/> <xsl:apply-templates select="h:div"/>
</paragraphes> </paragraphs>
<xsl:apply-templates select="h:section" mode="soussect"/> <xsl:apply-templates select="h:section" mode="soussect"/>
</contenu> </content>
</section> </section>
</xsl:template> </xsl:template>
<xsl:template match="h:section" mode="soussect"> <xsl:template match="h:section" mode="soussect">
<soussection></soussection> <soussection></soussection>
</xsl:template> </xsl:template>
<xsl:template match="h:div" > <xsl:template match="h:div" >
<xsl:if test="h:p"> <xsl:if test="h:p">
<paragraphe> <paragraph>
<xsl:value-of select="."/> <xsl:value-of select="."/>
</paragraphe> </paragraph>
</xsl:if> </xsl:if>
<xsl:if test="h:ul"> <xsl:if test="h:ul">
<xsl:apply-templates select="h:ul"></xsl:apply-templates> <xsl:apply-templates select="h:ul"></xsl:apply-templates>
...@@ -75,9 +78,9 @@ ...@@ -75,9 +78,9 @@
</xsl:template> </xsl:template>
<xsl:template match="h:ul"> <xsl:template match="h:ul">
<xsl:for-each select="h:li"> <xsl:for-each select="h:li">
<paragraphe> <paragraph>
<xsl:value-of select="h:p"/> <xsl:value-of select="h:p"/>
</paragraphe> </paragraph>
</xsl:for-each> </xsl:for-each>
</xsl:template> </xsl:template>
......
...@@ -31,3 +31,39 @@ User Story ...@@ -31,3 +31,39 @@ User Story
* Put the `.hdoc` files in the input folder * Put the `.hdoc` files in the input folder
* Run `run.bat` or `run.sh` according to your operating system * Run `run.bat` or `run.sh` according to your operating system
* The output files are in the output folder * The output files are in the output folder
DONE
---
Opale Hdoc Canoprof
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
Module fichier hdoc Programme
Objectif / Introduction / Conclusion du module Section contenant une div avec un header et du texte Séance contenant une activité de type description courte
Division ou activité Section Séance
Grain opale Section contenant une section Activité Texte et multimédia
Parties et sous-partie d’un grain section/section/section... Activité Texte et multimédia
Définition div avec un attribut data-hdoc-type = definiton Définition
Exemple div avec un attribut data-hdoc-type = example Exemple
Remarque div avec un attribut data-hdoc-type = remark Hypothèse (information?)
Conseil div avec un attribut data-hdoc-type = advice Conseil
Attention div avec un attribut data-hdoc-type = warning Attention
Complément div avec un attribut data-hdoc-type = complement Complément
Fondamental div avec un attribut data-hdoc-type = emphasis Méthode
Remarque : le texte, les listes, les tableaux fonctionnent.
TODO
---
Points particuliers de Canoprof :
Questions avec corrigé
Consigne élève
Remarque prof
Blocs :
Information Pas traité (à faire dans Opale_to_Hdoc et Hdoc_to_canoprof)
Méthode Pas traité (à faire dans Opale_to_Hdoc et Hdoc_to_canoprof)
Rappel Pas traité (à faire dans Opale_to_Hdoc et Hdoc_to_canoprof)
Syntaxe Pas traité Pas traité (à faire dans Opale_to_Hdoc et Hdoc_to_canoprof)
Texte légal Pas traité Pas traité (à faire dans Opale_to_Hdoc et Hdoc_to_canoprof)
Simulation Pas traité Pas traité (à faire dans Opale_to_Hdoc et Hdoc_to_canoprof)
\ No newline at end of file
...@@ -77,6 +77,17 @@ ...@@ -77,6 +77,17 @@
<xsl:if test="not(./h:header/h:h1/text())"> Untitled </xsl:if> <xsl:if test="not(./h:header/h:h1/text())"> Untitled </xsl:if>
<xsl:value-of select="./h:header/h:h1"/> <xsl:value-of select="./h:header/h:h1"/>
</sp:title> </sp:title>
<!-- If a SOLO section have a div; this div become a Canoprof's resume of the current seance.
<xsl:if test="./h:div/*">
<sp:abstract>
<cp:txtDesc>
<xsl:apply-templates select="./h:div/*" mode="resume"/>
</cp:txtDesc>
</sp:abstract>
</xsl:if>
-->
</cp:sessionM> </cp:sessionM>
<xsl:apply-templates select="./*"/> <xsl:apply-templates select="./*"/>
</cp:session> </cp:session>
...@@ -144,10 +155,38 @@ ...@@ -144,10 +155,38 @@
</xsl:template> </xsl:template>
<!-- CanoProf's Activite TetM (section) = hdoc's body/Section/Section/(Section...) = Opale's Grain (partie) --> <!-- CanoProf's Activite TetM (section) = hdoc's body/Section/Section/(Section...) = Opale's Grain (partie) -->
<!-- TODO -->
<xsl:template match="h:section" mode="CanoprofSection"> <xsl:template match="h:section" mode="CanoprofSection">
<sp:section>
<cp:textActivity>
<cp:activityM>
<sp:title>
<xsl:if test="not(./h:header/h:h1/text())"> Untitled </xsl:if>
<xsl:value-of select="./h:header/h:h1"/>
</sp:title>
<xsl:if test="(./h:header/h:div[@data-hdoc-type = 'introduction']/text())">
<xsl:apply-templates
select="./h:header/h:div[@data-hdoc-type = 'introduction']"/>
</xsl:if>
</cp:activityM>
<xsl:if test="./h:div/*">
<sp:body>
<cp:blocks>
<xsl:apply-templates select="./h:div"/>
</cp:blocks>
</sp:body>
</xsl:if>
<xsl:if test="./h:section/*">
<xsl:apply-templates select="./h:section" mode="CanoprofSection"/>
</xsl:if>
</cp:textActivity>
</sp:section>
</xsl:template> </xsl:template>
<!-- TODO : intro/conlcusion/obj d'une activité....
<xsl:template match="h:section[@data-hdoc-type = 'introduction'] | h:section[@data-hdoc-type = 'conclusion']">
</xsl:template>
-->
<!-- Div related templates --> <!-- Div related templates -->
<!-- Formatting content based on @data-hdoc-type --> <!-- Formatting content based on @data-hdoc-type -->
<xsl:template match="h:div"> <xsl:template match="h:div">
...@@ -359,6 +398,18 @@ ...@@ -359,6 +398,18 @@
</xsl:if> </xsl:if>
</xsl:template> </xsl:template>
<!--
<xsl:template match="h:p | h:ul | h:ol" mode="resume">
<xsl:if test="not(preceding-sibling::h:p)">
<xsl:if test="not(preceding-sibling::h:ul)">
<xsl:if test="not(preceding-sibling::h:ol)">
<xsl:call-template name="blockloop"/>
</xsl:if>
</xsl:if>
</xsl:if>
</xsl:template>
-->
<xsl:template name="blockloop"> <xsl:template name="blockloop">
<xsl:for-each select=". | ./following-sibling::*"> <xsl:for-each select=". | ./following-sibling::*">
<xsl:choose> <xsl:choose>
...@@ -401,6 +452,7 @@ ...@@ -401,6 +452,7 @@
</sc:inlineStyle> </sc:inlineStyle>
</xsl:if> </xsl:if>
</xsl:template> </xsl:template>
<xsl:template match="h:em"> <xsl:template match="h:em">
<xsl:if test="./* | ./text()"> <xsl:if test="./* | ./text()">
<sc:inlineStyle role="emphasis"> <sc:inlineStyle role="emphasis">
...@@ -408,6 +460,7 @@ ...@@ -408,6 +460,7 @@
</sc:inlineStyle> </sc:inlineStyle>
</xsl:if> </xsl:if>
</xsl:template> </xsl:template>
<xsl:template match="h:q"> <xsl:template match="h:q">
<xsl:if test="./* | ./text()"> <xsl:if test="./* | ./text()">
<sc:phrase role="quote"> <sc:phrase role="quote">
...@@ -415,6 +468,7 @@ ...@@ -415,6 +468,7 @@
</sc:phrase> </sc:phrase>
</xsl:if> </xsl:if>
</xsl:template> </xsl:template>
<xsl:template match="h:sub"> <xsl:template match="h:sub">
<xsl:if test="./* | ./text()"> <xsl:if test="./* | ./text()">
<sc:textLeaf role="ind"> <sc:textLeaf role="ind">
...@@ -422,6 +476,7 @@ ...@@ -422,6 +476,7 @@
</sc:textLeaf> </sc:textLeaf>
</xsl:if> </xsl:if>
</xsl:template> </xsl:template>
<xsl:template match="h:sup"> <xsl:template match="h:sup">
<xsl:if test="./* | ./text()"> <xsl:if test="./* | ./text()">
<sc:textLeaf role="exp"> <sc:textLeaf role="exp">
...@@ -429,6 +484,7 @@ ...@@ -429,6 +484,7 @@
</sc:textLeaf> </sc:textLeaf>
</xsl:if> </xsl:if>
</xsl:template> </xsl:template>
<xsl:template match="h:a"> <xsl:template match="h:a">
<xsl:if test="./* | ./text()"> <xsl:if test="./* | ./text()">
<sc:phrase role="url"> <sc:phrase role="url">
......
...@@ -22,7 +22,7 @@ Dependance ...@@ -22,7 +22,7 @@ Dependance
---------- ----------
This project can be used alone if you only want to convert an HDOC into a Neo4j requests file. This project can be used alone if you only want to convert an HDOC into a Neo4j requests file or directly insert data in neo4j local database.
User documentation User documentation
...@@ -34,11 +34,9 @@ You have to respect the following steps : ...@@ -34,11 +34,9 @@ You have to respect the following steps :
2 - Modifier le fichier config.json (dans le dossier node) avec la base de données locale et le mot de passe personnel (base publique à venir) 2 - Modifier le fichier config.json (dans le dossier node) avec la base de données locale et le mot de passe personnel (base publique à venir)
3 - En ligne de commande, executer "npm install" pour installer les packages nodes (en attendant une automatisation future de la tache) 3 - Lancer le fichier runWithNode (choisissez l'extension selon votre OS)
4 - Lancer le fichier runWithNode (choisissez l'extension selon votre OS) 4 - Admirez le graph créé avec neo4j dans votre navigateur (sur localhost:7474)
5 - Admirez le graph créé avec neo4j dans votre navigateur (sur localhost:7474)
Unsupported Unsupported
......
...@@ -31,12 +31,12 @@ ...@@ -31,12 +31,12 @@
</xsl:template> </xsl:template>
<!-- Traitement spécial pour les objectifs, ils ont parfois la même longueur --> <!-- Traitement spécial pour les objectifs, ils ont parfois la même longueur -->
<xsl:template match="body/section/section/section[@data-hdoc-type='aims']"> <xsl:template match="body/section/section/section[@data-hdoc-type='aims' or @data-hdoc-type='synthesis']">
MERGE (i:<xsl:value-of select="./@data-hdoc-type"/> {title:"<xsl:value-of select="concat(./header/h1,' - ', parent::section/header/h1, ' (',string-length(.), ')')"/>"}); MERGE (i:<xsl:value-of select="./@data-hdoc-type"/> {title:"<xsl:value-of select="concat(./header/h1,' - ', parent::section/header/h1, ' (',string-length(.), ')')"/>"});
MATCH (l1 {title:"<xsl:value-of select="concat(./header/h1,' - ', parent::section/header/h1, ' (',string-length(.), ')')"/>"}), (l2 {title:"<xsl:value-of select="concat(parent::section/header/h1,' (',string-length(parent::section), ')')"/>"}) MERGE (l2)-[:LIEN]->(l1); MATCH (l1 {title:"<xsl:value-of select="concat(./header/h1,' - ', parent::section/header/h1, ' (',string-length(.), ')')"/>"}), (l2 {title:"<xsl:value-of select="concat(parent::section/header/h1,' (',string-length(parent::section), ')')"/>"}) MERGE (l2)-[:LIEN]->(l1);
</xsl:template> </xsl:template>
<xsl:template match="body/section/section/section[not(@data-hdoc-type='aims')]"> <xsl:template match="body/section/section/section[not(@data-hdoc-type='aims' or @data-hdoc-type='synthesis')]">
MERGE (i:<xsl:value-of select="./@data-hdoc-type"/> {title:"<xsl:value-of select="concat(./header/h1,' (',string-length(.), ')')"/>"}); MERGE (i:<xsl:value-of select="./@data-hdoc-type"/> {title:"<xsl:value-of select="concat(./header/h1,' (',string-length(.), ')')"/>"});
MATCH (l1 {title:"<xsl:value-of select="concat(./header/h1,' (',string-length(.), ')')"/>"}), (l2 {title:"<xsl:value-of select="concat(parent::section/header/h1,' (',string-length(parent::section), ')')"/>"}) MERGE (l2)-[:LIEN]->(l1); MATCH (l1 {title:"<xsl:value-of select="concat(./header/h1,' (',string-length(.), ')')"/>"}), (l2 {title:"<xsl:value-of select="concat(parent::section/header/h1,' (',string-length(parent::section), ')')"/>"}) MERGE (l2)-[:LIEN]->(l1);
</xsl:template> </xsl:template>
......
!tmp/.gitkeep !tmp/.gitkeep
!input/.gitkeep
!output/.gitkeep !output/.gitkeep
...@@ -104,6 +104,7 @@ ul > li p, ol > li p { ...@@ -104,6 +104,7 @@ ul > li p, ol > li p {
ul { ul {
list-style-type: none; list-style-type: none;
padding-left: 3em;
} }
ul > li { ul > li {
...@@ -112,7 +113,7 @@ ul > li { ...@@ -112,7 +113,7 @@ ul > li {
ul > li::before { ul > li::before {
position: absolute; position: absolute;
left: -5mm; left: -1em;
content: "\2013"; content: "\2013";
} }
......
.ant-targets-mindMapping2Hdoc.ant
result/**
temp/**
This diff is collapsed.
Mindmapping to Opale
=================
Conversion of Freemind file(s) (.mm) to Opale (.scar)
## Licence
-------------------------------
http://www.gnu.org/licenses/gpl-3.0.txt
## Credits
-------------------------------
This section has been written by
* Thibault BROCHETON
* Bastien FREMONDIERE
* Amélie PERDRIAUD
* Quentin KEUNEBROEK
* Alexandre GUTH
It is based on the work of Guillaume GOMEZ in 2014.
## Presentation
The project aims at converting Freemind files in Opale files. If you use another tool to create mindmapping files, you can probably export it to a .mm file and use it in this converter.
## Dependence
-------------------------------
In dependence with mindmapping_to_hdoc and hdoc_to_opale
## User documentation
-------------------------------
* Use a terminal and go to the root of the folder (mindmapping_to_opale).
* Please refer to the part *Rules to follow* to understand the rules that can help you to personalize the output
* 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'
If you want to convert one specific file that is in the input folder, use the parameters ' -DinputPath input/<yourFilename>' (ex : 'sh run.sh -DinputPath input/<yourFilename>')
*You will find the result of the conversion in the folder mindmapping_to_opale/output*
*You can find a sample file il the folder /samples.*
### 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
* Then :
* A node without children is transformed in **grain content**
* A node with children is transformed in **division**
* You can add introduction and conclusion using the hashtag **#intro** and **#conclu** on all the node that has no child
* You can use **#p** to create a paragraph, and **#a** to create a link
* You can use some hashtags to create specific contents :
* **#rmk** : a remark
* **#adv** : an advice
* **#emph** : an emphasis
* **#compl** : a complement
* **#wrng** : a warning
* **#ex** : an example
* **#def** : a definition
* **#question** : a MCQ
* **#singlechoicequestion** : a QCU
* **#choice-qcu** : an answer within a QCU
* **#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
* **#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.
## Unsupported
* Convert colors
* Convert icon into summary elements
* HTML node
## Known bugs
## TODO
* Develop new hashtags to create other type of Opale contents (such as QCM, self-evaluation etc.)
## Technicals notes
### Preamble
This subsection will explain precisely how the conversion process works. If you are reading this, we assume you are familiar with XML technologies seen in NF29 (i.e. ANT scripts, XSL-XSLT transformations and Hdoc format). We also recommend you to open sources files and read the comments.
Besides, the converter have been tested on recent ANT versions (> 1.7.0) only. It depends on hdoc_to_opale module.
### How does the converter works
This converter is using standard NF29 conversion project structure : a main ANT file (mindmapping_to_opale.ant), which handles routine tasks (zipping archives, copying files, order tasks), XSL-XSLT transformation scripts calls. This main ANT file is composed of several targets, and supports both Windows or Linux platforms.
This ant file is called by a script (run.sh or run.bat), with ou without parameters.
### Hdoc files
During the conversion process, the converter is using the converter mindmapping_to_hodc. The result of this conversion is also available in the folder output.
### What does the main ANT file do ?
* Delete and create folder temp, output, output/hdoc and output/scar
* Check if the OS is Windows or Mac, and call the appropriate target
* If there is no input path in parameters, it converts all the files present in the input folder
* It calls the converter mindmapping_to_hdoc to convert .mm files in .hdoc files.
* Copy the results of the conversion in the folder /output/hdoc
* It calls the converter hdoc_to_opale to convert .hdoc files in .scar files
* Copy the results of the conversion in the folder /output/scar
* Finally, clean temporary files
## Capitalization
\ 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
<?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"/>