diff --git a/canoprof_to_hdoc/canoprof_to_hdoc.ant b/canoprof_to_hdoc/canoprof_to_hdoc.ant index e30585dc25b3eade6e79e385290ede1b7219be6d..ed12ac67df36a1381555fecd855173d2ad568d7c 100644 --- a/canoprof_to_hdoc/canoprof_to_hdoc.ant +++ b/canoprof_to_hdoc/canoprof_to_hdoc.ant @@ -7,6 +7,7 @@ + @@ -15,6 +16,21 @@ + + + + + + + + + + + + + + + @@ -43,8 +59,10 @@ - - + + + + @@ -63,6 +81,11 @@ - + + + + + + \ No newline at end of file diff --git a/canoprof_to_hdoc/canoprof_to_hdoc.properties b/canoprof_to_hdoc/canoprof_to_hdoc.properties index f71beade7a52ab1b121935e14f56cca9e6c75aa4..95919e5d595fb691297661ed936f542d38d689ee 100644 --- a/canoprof_to_hdoc/canoprof_to_hdoc.properties +++ b/canoprof_to_hdoc/canoprof_to_hdoc.properties @@ -4,6 +4,7 @@ tmp = ${basedir}/tmp xsl = ${basedir}/xsl lib = ${basedir}/lib log = ${basedir}/log +hdoc = ${out}/hdoc unzipfolder = ${basedir}/unzip cano_in = ../canoprof_to_hdoc/input diff --git a/canoprof_to_hdoc/xsl/activite_texte_multimedia.xsl b/canoprof_to_hdoc/xsl/activite_texte_multimedia.xsl new file mode 100644 index 0000000000000000000000000000000000000000..79676730f7bbc6b8bec84fdd46d8086057250ba3 --- /dev/null +++ b/canoprof_to_hdoc/xsl/activite_texte_multimedia.xsl @@ -0,0 +1,120 @@ + + + + +
+
+ + +
+
+ + + + + + +
+ +
+
+ + + + +

+ +

+
+ + +
+ +
+
+ + + +
+ + +
+
+ + + +
+ + +
+
+ + +
+ + +
+
+ + + +
+ + +
+
+ + +
+ + +
+
+ + +
+ + +
+
+ + +
+ + +
+
+ + + +
+ + +
+
+ + + +
+ + +
+
+ + + + + + + + +

+ test + +

+
+ +
\ No newline at end of file diff --git a/canoprof_to_hdoc/xsl/programmation.xsl b/canoprof_to_hdoc/xsl/programmation.xsl new file mode 100644 index 0000000000000000000000000000000000000000..5a0a050bde5ab260433ec99b6b2ddcea51624ac7 --- /dev/null +++ b/canoprof_to_hdoc/xsl/programmation.xsl @@ -0,0 +1,57 @@ + + + + + + + + + RNGSchema="http://hdoc.crzt.fr/schemas/xhtml/hdoc1-xhtml.rng" type="xml" + + + + + + + + + + + + + + + + + +
+
+ +
+ + + + +
+ +
+ + + + + + + + + + <xsl:value-of select="."/> + + + +

+
+
\ No newline at end of file diff --git a/framapad_to_hdoc/README.md b/framapad_to_hdoc/README.md index 370ee752259ccb7154852515465281507daadddb..8f47e51c52974780555208076b9c0f8aa26b3f37 100755 --- a/framapad_to_hdoc/README.md +++ b/framapad_to_hdoc/README.md @@ -54,7 +54,14 @@ Example : Currently available on: https://framemo.org/framapad_to_opale +See also : https://bimestriel.framapad.org/p/nf29_framapad_to_opale for the full documentation of our working process. + ## TODO +- Nested Lists +- Indentation +- Titles (and therefore Structure of the doc) +- Coloured text +- Code - Markdown ## Technical notes diff --git a/framapad_to_hdoc/input/.gitkeep b/framapad_to_hdoc/input/.gitkeep new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/framapad_to_hdoc/output/.gitkeep b/framapad_to_hdoc/output/.gitkeep new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/framapad_to_opale/output/.gitkeep b/framapad_to_opale/output/.gitkeep new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/hdoc_to_basex/README.md b/hdoc_to_basex/README.md index 94a76b0f48f6f1873efea7c42b6546dbc402f82d..7c81d8c298e9c82024bc26ca14ab4e15fd7634f5 100644 --- a/hdoc_to_basex/README.md +++ b/hdoc_to_basex/README.md @@ -29,6 +29,17 @@ This project can be used alone if you want to import an HDOC file into basex. - In a certain section, by searching a key word, user can obtain paragraphes that contain it. - User can get definitions related to a keyword - User can get examples whose titles contain a keyword -[Step 1] - - Unzip works, creation of a XML file with the title of the hdoc. (little problem, all of the document is in the output). - - the file created is in the tmp/{hdocfile} directory. \ No newline at end of file + +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) + - Run the transformation progam (Win : double click run.bat, Linux : execute run.sh) + + [Step 2 : Create data base in basex] + - Download and install [BaseX](http://basex.org/products/download/all-downloads/) + - 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). + Follow the instructions in the script, and then execute it. + + [Step 3 : Make XQuery request] + - \ No newline at end of file diff --git a/hdoc_to_basex/basex/command/createdb.bxs b/hdoc_to_basex/basex/command/createdb.bxs new file mode 100644 index 0000000000000000000000000000000000000000..2628e5608fef3b69dac5f465c69303f45fc7b54e --- /dev/null +++ b/hdoc_to_basex/basex/command/createdb.bxs @@ -0,0 +1,10 @@ +# This script allows for creation of a data base in baseX from the xml files in the folder output +# Before executing this script, please make sure that you have successfully finished the transformation in the step 1 in the "user story" of the README.md +# Syntax : CREATE DB [name] ([input]) +# Example : +CREATE DB myDB D:\School\UTC\GI04\NF29\Projet\hdoc\hdoc_to_basex\output + +#CREATE DB myDB [..the repertory of the projet in your local disk..]/hdoc/hdoc_to_basex/output + + +# P.S. If you get error message : Resource "..." not found, please confirm your file repertory is correct \ No newline at end of file diff --git a/hdoc_to_basex/basex/xquery/searchDocByAuthor.hq b/hdoc_to_basex/basex/xquery/searchDocByAuthor.hq new file mode 100644 index 0000000000000000000000000000000000000000..1274997ebd5ca31682860172b91057638b9d8582 --- /dev/null +++ b/hdoc_to_basex/basex/xquery/searchDocByAuthor.hq @@ -0,0 +1,18 @@ +(: This script will return documents by searching its author :) +(: We can assign a Regular Expression to the variable $author :) +(: For example, $author := '^Baptiste Montangé$', to search for an exact name:) +(: For example, $name := 'Montangé', to search for documents whose author named Coutant:) +(: Remark : Accents in the authors' names have been taken care of :) + +{ + let $name := 'Montangé' + let $name_noAcc := translate($name, 'áàâäéèêëíìîïóòôöúùûü','aaaaeeeeiiiioooouuuu') + for $doc in //document + return + for $author in $doc/authors/author + let $titre := $doc/titre + let $author_noAcc := translate($author, 'áàâäéèêëíìîïóòôöúùûü','aaaaeeeeiiiioooouuuu') + where matches($author_noAcc, $name_noAcc) + group by $titre (: Avoid duplications of documents by their titre:) + return $doc +} \ No newline at end of file diff --git a/hdoc_to_basex/basex/xquery/searchDocByTitle.hq b/hdoc_to_basex/basex/xquery/searchDocByTitle.hq new file mode 100644 index 0000000000000000000000000000000000000000..7c12d7753dc77b72a32ecda31bbc3f00ed807e6d --- /dev/null +++ b/hdoc_to_basex/basex/xquery/searchDocByTitle.hq @@ -0,0 +1,11 @@ +(: This script will return documents by searching one keyword in their title :) +(: We can assign a Regular Expression to the variable $name :) +(: For example, $name := '^NF29_HdocEtherpad$', to search for an exact name:) +(: For example, $name := 'NF29', to search for documents whose name contains 'NF29':) + +{ + let $name := '^NF29_HdocEtherpad$' + for $doc in //document + where matches($doc/titre, $name, "i") + return $doc +} \ No newline at end of file diff --git a/hdoc_to_basex/hdoc_to_basex.ant b/hdoc_to_basex/hdoc_to_basex.ant index 5d14d76c5b0d1470b91a9dcf805b3259ecb5faa4..1ad179f07e03f4a45ab540d0a92c4fe9d4e0bbbb 100644 --- a/hdoc_to_basex/hdoc_to_basex.ant +++ b/hdoc_to_basex/hdoc_to_basex.ant @@ -40,6 +40,7 @@
+ @@ -49,6 +50,7 @@ + @@ -56,6 +58,7 @@ + \ No newline at end of file diff --git a/hdoc_to_basex/input/sample.hdoc b/hdoc_to_basex/input/sample.hdoc deleted file mode 100644 index 29de6baa29e3acb2a30b7dc73b610f3bea7024f9..0000000000000000000000000000000000000000 Binary files a/hdoc_to_basex/input/sample.hdoc and /dev/null differ diff --git a/hdoc_to_basex/xsl/transformation.xsl b/hdoc_to_basex/xsl/transformation.xsl index fe8a1b1e46b840346c05dec3f95d716bbf4cc698..cf2c26948c21059803a34474d80d6996f3bc2355 100644 --- a/hdoc_to_basex/xsl/transformation.xsl +++ b/hdoc_to_basex/xsl/transformation.xsl @@ -1,19 +1,87 @@ - - - - - + xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:h="http://www.utc.fr/ics/hdoc/xhtml" + exclude-result-prefixes="xs" version="2.0"> + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + +
+ + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + -
\ No newline at end of file + + + diff --git a/hdoc_to_canoprof/samples/Sample_V1.hdoc b/hdoc_to_canoprof/samples/Sample_V1.hdoc new file mode 100644 index 0000000000000000000000000000000000000000..b509a0980fc5ecfdde27fac6d7c7bd13b72bcc88 Binary files /dev/null and b/hdoc_to_canoprof/samples/Sample_V1.hdoc differ diff --git a/hdoc_to_canoprof/xsl/transformation2.xsl b/hdoc_to_canoprof/xsl/transformation2.xsl index af3d4161a2c456cbe0ed28d9ee1646b9455aab11..3a05863f1d2e6a1c1ec47c427929a819f5776e55 100644 --- a/hdoc_to_canoprof/xsl/transformation2.xsl +++ b/hdoc_to_canoprof/xsl/transformation2.xsl @@ -6,11 +6,11 @@ xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:xs="http://www.w3.org/2001/XMLSchema" exclude-result-prefixes="xs"> - + - + - + @@ -20,7 +20,7 @@ - + @@ -28,22 +28,22 @@ - + - + - + - + - + @@ -54,6 +54,7 @@ + @@ -66,19 +67,216 @@ - + - + + + + + + Untitled + + + + + + + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/hdoc_to_elasticSearch/build.properties b/hdoc_to_elasticSearch/build.properties index bbfae44274e36457e3cfcf941965cceeaff39fbf..fce1ee59215cffc947ec62470511cb338b498392 100644 --- a/hdoc_to_elasticSearch/build.properties +++ b/hdoc_to_elasticSearch/build.properties @@ -1,4 +1,5 @@ libdir=${basedir}/lib xsldir=${basedir}/xsl inputPath=${basedir}/input -outputPath=${basedir}/output \ No newline at end of file +tmpHdoc=${basedir}/tmp_hdoc +outputPath=${basedir}/output diff --git a/hdoc_to_elasticSearch/hdoc_to_elasticsearch.ant b/hdoc_to_elasticSearch/hdoc_to_elasticsearch.ant index b551fcc41e663819a2791d9827910b9f501afcc4..aaf11e35420318750be13d0f6e09e37c685f158c 100644 --- a/hdoc_to_elasticSearch/hdoc_to_elasticsearch.ant +++ b/hdoc_to_elasticSearch/hdoc_to_elasticsearch.ant @@ -1,41 +1,45 @@ - - - - + + + + + - - + + - - + - - Entry file : ${hdocFileName} - + Entry file : ${hdocFileName} + - - - - - - - - - - + + + + + + + + + + - - - - + + +
- - - - + + + + + + + + + + + + - - \ No newline at end of file diff --git a/hdoc_to_elasticSearch/xsl/content_extractor.xsl b/hdoc_to_elasticSearch/xsl/content_extractor.xsl new file mode 100644 index 0000000000000000000000000000000000000000..f7328d3ece1dfa371c3aeab1fad781e9e0837b03 --- /dev/null +++ b/hdoc_to_elasticSearch/xsl/content_extractor.xsl @@ -0,0 +1,52 @@ + + + + + + + + + + + + { + + + } + + + + + "title" : "", + + "keywords" : [ + + "", + + ], + + + + + + + + "author" : "" + + + + "date" : "", + + + + "rights" : "", + + + + + \ No newline at end of file diff --git a/hdoc_to_epub/README.md b/hdoc_to_epub/README.md index 5700ddfa8fd1512186dc9675078e43d6e4ebae27..0350fc1503cec26cbe0460e393507796417db564 100644 --- a/hdoc_to_epub/README.md +++ b/hdoc_to_epub/README.md @@ -35,15 +35,23 @@ La personne possède un hdoc et voudrait le convertir en epub. Il se dirige vers Unsupported ----------- - - Known bugs ---------- +Problème dans le hdoc : contient des images mais ne sont pas référencées. + +Problème avec les keywords : le hdoc contient des keywords mais nous ne savons pas où les utiliser. Todo list --------- +Validation de l'epub actuel + +Mise en place de la première page + +Validation + +Étude compatibilité entre EPUB2 et EPUB3 Technical Notes --------------- diff --git a/hdoc_to_epub/file/container.xml b/hdoc_to_epub/file/container.xml new file mode 100644 index 0000000000000000000000000000000000000000..9dd24e8fee1838533a2dfe7d354b052f90691024 --- /dev/null +++ b/hdoc_to_epub/file/container.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/hdoc_to_epub/file/mimetype b/hdoc_to_epub/file/mimetype new file mode 100644 index 0000000000000000000000000000000000000000..403c4f02dfa7f008d60eee9539a2695157623370 --- /dev/null +++ b/hdoc_to_epub/file/mimetype @@ -0,0 +1 @@ +application/epub+zip diff --git a/hdoc_to_epub/hdoc_to_epub.ant b/hdoc_to_epub/hdoc_to_epub.ant index 1e2f06a71dec420f907eaaa90d1a7ac96de64be4..513a16e34212ff530e9d7034517a42dd3fd503cf 100644 --- a/hdoc_to_epub/hdoc_to_epub.ant +++ b/hdoc_to_epub/hdoc_to_epub.ant @@ -7,8 +7,12 @@ + + - + + + @@ -17,6 +21,8 @@ + + @@ -26,7 +32,7 @@ - + @@ -34,6 +40,28 @@ + + + + + + + + + + + + + + + + + + + + + + @@ -57,4 +85,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/hdoc_to_epub/input/result.hdoc b/hdoc_to_epub/input/result.hdoc new file mode 100644 index 0000000000000000000000000000000000000000..06512099211eea0188ee989fdf16a6fbea4821d3 Binary files /dev/null and b/hdoc_to_epub/input/result.hdoc differ diff --git a/hdoc_to_epub/xsl/chapitre.xsl b/hdoc_to_epub/xsl/chapitre.xsl new file mode 100644 index 0000000000000000000000000000000000000000..37aa66bfc830a2038f705f93b92e17c07d6d9ab5 --- /dev/null +++ b/hdoc_to_epub/xsl/chapitre.xsl @@ -0,0 +1,50 @@ + + + + + + + + ../../../retour/oebps/chapitres/chapitre.xhtml + + + + <xsl:value-of select="header/h1"/> + + +

+ + + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/hdoc_to_epub/xsl/content.xsl b/hdoc_to_epub/xsl/content.xsl new file mode 100644 index 0000000000000000000000000000000000000000..e58f9a4b4d0800031a1ffba52d4d3bb4cde8f177 --- /dev/null +++ b/hdoc_to_epub/xsl/content.xsl @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/hdoc_to_epub/xsl/content/manifest.xsl b/hdoc_to_epub/xsl/content/manifest.xsl new file mode 100644 index 0000000000000000000000000000000000000000..e16b756246149d8e12a2433ff68d1a2e729dd702 --- /dev/null +++ b/hdoc_to_epub/xsl/content/manifest.xsl @@ -0,0 +1,21 @@ + + + + + + + + chapitres/chapitre.xhtml + ch + application/xhtml+xml + + + + + + \ No newline at end of file diff --git a/hdoc_to_epub/xsl/content/metadata.xsl b/hdoc_to_epub/xsl/content/metadata.xsl new file mode 100644 index 0000000000000000000000000000000000000000..14160f06c64c1ac2123abb022d3dafc3388ee518 --- /dev/null +++ b/hdoc_to_epub/xsl/content/metadata.xsl @@ -0,0 +1,16 @@ + + + + + + + fr + + + + \ No newline at end of file diff --git a/hdoc_to_epub/xsl/content/spine.xsl b/hdoc_to_epub/xsl/content/spine.xsl new file mode 100644 index 0000000000000000000000000000000000000000..5d63a71696544d7741957541f3f79182d083c8a3 --- /dev/null +++ b/hdoc_to_epub/xsl/content/spine.xsl @@ -0,0 +1,17 @@ + + + + + + + ch + + + + + \ No newline at end of file diff --git a/hdoc_to_epub/xsl/tdmncx.xsl b/hdoc_to_epub/xsl/tdmncx.xsl new file mode 100644 index 0000000000000000000000000000000000000000..fea94baaf046509f07b03f51fceb8b80e8546874 --- /dev/null +++ b/hdoc_to_epub/xsl/tdmncx.xsl @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + h + ch_ + + + + + + + content.html#ch_ + + + + + + + + + \ No newline at end of file diff --git a/hdoc_to_mongo/hdoc_to_mongo.ant b/hdoc_to_mongo/hdoc_to_mongo.ant index abf1728aac755a73dee8c4ada0f0ba2cfa19c812..1f2ca2dd004f618662e4988d9cc70f70d01de75a 100644 --- a/hdoc_to_mongo/hdoc_to_mongo.ant +++ b/hdoc_to_mongo/hdoc_to_mongo.ant @@ -1,4 +1,4 @@ - + @@ -22,9 +22,11 @@ + + + + - - \ No newline at end of file diff --git a/hdoc_to_mongo/xsl/main.xsl b/hdoc_to_mongo/xsl/main.xsl new file mode 100644 index 0000000000000000000000000000000000000000..b6799ac197730be93afa2656804fac4237a6e56d --- /dev/null +++ b/hdoc_to_mongo/xsl/main.xsl @@ -0,0 +1,26 @@ + + + + + + + + + + + + { + "title" : , + "authors" : , + "keywords" : , + "rights" : , + "introduction" : + } + + + + \ No newline at end of file diff --git a/hdoc_to_mongo/xsl/subroutines/author.xsl b/hdoc_to_mongo/xsl/subroutines/author.xsl new file mode 100644 index 0000000000000000000000000000000000000000..b1dc09184f3b82bd643f0eaa74997ce49cd2a60e --- /dev/null +++ b/hdoc_to_mongo/xsl/subroutines/author.xsl @@ -0,0 +1,11 @@ + + + + + + + + + \ No newline at end of file diff --git a/hdoc_to_mongo/xsl/subroutines/introduction.xsl b/hdoc_to_mongo/xsl/subroutines/introduction.xsl new file mode 100644 index 0000000000000000000000000000000000000000..0f14c46c0fa87c1b4929419b342f3f2ed1d12c7a --- /dev/null +++ b/hdoc_to_mongo/xsl/subroutines/introduction.xsl @@ -0,0 +1,11 @@ + + + + + + + + + \ No newline at end of file diff --git a/hdoc_to_mongo/xsl/subroutines/keyword.xsl b/hdoc_to_mongo/xsl/subroutines/keyword.xsl new file mode 100644 index 0000000000000000000000000000000000000000..34a368921f758cbd9d98f0c827dcc5f79a8c9f01 --- /dev/null +++ b/hdoc_to_mongo/xsl/subroutines/keyword.xsl @@ -0,0 +1,10 @@ + + + + + + + + \ No newline at end of file diff --git a/hdoc_to_mongo/xsl/subroutines/right.xsl b/hdoc_to_mongo/xsl/subroutines/right.xsl new file mode 100644 index 0000000000000000000000000000000000000000..8ee3e6223a8aa8d576bd7118f3f6f89199003348 --- /dev/null +++ b/hdoc_to_mongo/xsl/subroutines/right.xsl @@ -0,0 +1,11 @@ + + + + + + + + + \ No newline at end of file diff --git a/hdoc_to_mongo/xsl/subroutines/title.xsl b/hdoc_to_mongo/xsl/subroutines/title.xsl new file mode 100644 index 0000000000000000000000000000000000000000..5380732d58121d8025d0385b361dd7f4d80b27be --- /dev/null +++ b/hdoc_to_mongo/xsl/subroutines/title.xsl @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/hdoc_to_mongo/xsl/xsl-import/array.xsl b/hdoc_to_mongo/xsl/xsl-import/array.xsl new file mode 100644 index 0000000000000000000000000000000000000000..e171fb00658676800a3af57138a7397f729cbd72 --- /dev/null +++ b/hdoc_to_mongo/xsl/xsl-import/array.xsl @@ -0,0 +1,15 @@ + + + + + + [ + + , + + + ] + + \ No newline at end of file diff --git a/hdoc_to_mongo/xsl/xsl-import/string.xsl b/hdoc_to_mongo/xsl/xsl-import/string.xsl new file mode 100644 index 0000000000000000000000000000000000000000..95a7dd5fa7440098eb8e2499753e89f76d42d63b --- /dev/null +++ b/hdoc_to_mongo/xsl/xsl-import/string.xsl @@ -0,0 +1,9 @@ + + + + + "" + + \ No newline at end of file diff --git a/hdoc_to_neo4j/ant/build.xml b/hdoc_to_neo4j/ant/build.xml deleted file mode 100644 index 13d4fcf59a1ecceace4dacf13bb74706c32bba41..0000000000000000000000000000000000000000 --- a/hdoc_to_neo4j/ant/build.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - On transforme le fichier!! - - - - - On initialise le dossier! - - - - - \ No newline at end of file diff --git a/hdoc_to_neo4j/hdoc_to_neo4j.ant b/hdoc_to_neo4j/hdoc_to_neo4j.ant new file mode 100644 index 0000000000000000000000000000000000000000..dccde7b253af819f671f16ca988ef4369bd29ec2 --- /dev/null +++ b/hdoc_to_neo4j/hdoc_to_neo4j.ant @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + ${newFileName} + + + + + + + On initialise le dossier! + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/hdoc_to_neo4j/lib/ant-contrib.jar b/hdoc_to_neo4j/lib/ant-contrib.jar new file mode 100644 index 0000000000000000000000000000000000000000..062537661a514c2ce97d18948f4f25f7226cc1a0 Binary files /dev/null and b/hdoc_to_neo4j/lib/ant-contrib.jar differ diff --git a/hdoc_to_neo4j/lib/saxon9he.jar b/hdoc_to_neo4j/lib/saxon9he.jar new file mode 100644 index 0000000000000000000000000000000000000000..4e635175be11bc83187a2525f2a821bb85a1a566 Binary files /dev/null and b/hdoc_to_neo4j/lib/saxon9he.jar differ diff --git a/hdoc_to_neo4j/node/config.json b/hdoc_to_neo4j/node/config.json new file mode 100644 index 0000000000000000000000000000000000000000..697a74de77755a9ba6a7ded7d889a18506b02667 --- /dev/null +++ b/hdoc_to_neo4j/node/config.json @@ -0,0 +1,7 @@ +{ + "db":"neo4j", + "pwd":"edwin007", + "host":"localhost", + "path":"/db/data", + "port":"7474" +} \ No newline at end of file diff --git a/hdoc_to_neo4j/node/insert.js b/hdoc_to_neo4j/node/insert.js new file mode 100644 index 0000000000000000000000000000000000000000..e5d407cc233b8607832a93f85caf93ff07541fe1 --- /dev/null +++ b/hdoc_to_neo4j/node/insert.js @@ -0,0 +1,39 @@ +const fs = require('fs'); +var maki = require('maki-sushi'); +const config = JSON.parse(fs.readFileSync('config.json')); +const testFolder = '../output/'; + + +fs.readdir(testFolder, (err, files) => { + files.forEach(file => { + let q = fs.readFileSync("../output/" + file).toString().replace(/[\n\t\r]/g,'').replace(/\s{4,}/g,'').split(';'); + q.pop(); + insert(q); + }); +}) + + +maki.config.setId(config.db,config.pwd); +maki.config.setEndpoint(config.host, config.path); +maki.config.setPort(config.port); + + +function insert(queries){ + for(let i = 0; i < queries.length; ++i){ + let q = queries[i]; + console.log(q + ";"); + if(q.indexOf('MATCH') !== -1){ + setTimeout(function(){ + maki.query.single(q + ';', function(status, response){ + console.log("on insere un lien " + response); + }); + }, 2000); + } + else{ + maki.query.single(q, function(status, response){ + console.log("on insere un noeud " + response); + }); + } + } +} + diff --git a/hdoc_to_neo4j/node/package.json b/hdoc_to_neo4j/node/package.json new file mode 100644 index 0000000000000000000000000000000000000000..9532cd12fea8e6749371a1ad807e7f703284fa31 --- /dev/null +++ b/hdoc_to_neo4j/node/package.json @@ -0,0 +1,16 @@ +{ + "name": "hdoc_to_neo4j", + "version": "1.0.0", + "main": "insert.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "Félix Alié", + "license": "ISC", + "dependencies": { + "fs": "^0.0.1-security", + "maki-sushi": "^1.0.5" + }, + "devDependencies": {}, + "description": "" +} diff --git a/hdoc_to_neo4j/run.bat b/hdoc_to_neo4j/run.bat new file mode 100644 index 0000000000000000000000000000000000000000..7c292f1ae3b34680d54a44c27fcf0f2294bd518b --- /dev/null +++ b/hdoc_to_neo4j/run.bat @@ -0,0 +1,9 @@ +@echo off +set ant=hdoc_to_neo4j.ant +set antparam=-Dnode false; + + +ant -buildfile %ant% %antparam% +pause + +REM start /MIN java.exe -classpath "%scJarList%" -Xmx150m org.apache.tools.ant.Main -buildfile %ant% %antparam% diff --git a/hdoc_to_neo4j/run.sh b/hdoc_to_neo4j/run.sh new file mode 100644 index 0000000000000000000000000000000000000000..a0685885cc5a159e1675cd9f4bb385935cc43118 --- /dev/null +++ b/hdoc_to_neo4j/run.sh @@ -0,0 +1,35 @@ +#!/bin/sh +lib="lib" +ant="hdoc_to_mongo.ant" +antparam="-Dnode false" + +#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 diff --git a/hdoc_to_neo4j/runWithNode.bat b/hdoc_to_neo4j/runWithNode.bat new file mode 100644 index 0000000000000000000000000000000000000000..fc8006bac976242fcd33382f773104d646377027 --- /dev/null +++ b/hdoc_to_neo4j/runWithNode.bat @@ -0,0 +1,9 @@ +@echo off +set ant=hdoc_to_neo4j.ant +set antparam=-Dnode true; + + +ant -buildfile %ant% %antparam% +pause + +REM start /MIN java.exe -classpath "%scJarList%" -Xmx150m org.apache.tools.ant.Main -buildfile %ant% %antparam% diff --git a/hdoc_to_neo4j/runWithNode.sh b/hdoc_to_neo4j/runWithNode.sh new file mode 100644 index 0000000000000000000000000000000000000000..19cbd286ae6f46c1553285ec7a2c4ed7894b5f55 --- /dev/null +++ b/hdoc_to_neo4j/runWithNode.sh @@ -0,0 +1,35 @@ +#!/bin/sh +lib="lib" +ant="hdoc_to_mongo.ant" +antparam="-Dnode true" + +#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 diff --git a/hdoc_to_neo4j/xsl/hdoc_to_neo4j.xsl b/hdoc_to_neo4j/xsl/hdoc_to_neo4j.xsl index d4f7c4d81ee3a3300d202a83c36b6217cc3f4a06..48d86921c2e6ddf23110d5e5483c44a78f45bf27 100644 --- a/hdoc_to_neo4j/xsl/hdoc_to_neo4j.xsl +++ b/hdoc_to_neo4j/xsl/hdoc_to_neo4j.xsl @@ -13,18 +13,33 @@ - + + MERGE (i:module {title:""}); - MERGE (i:Item {title:""}); + MERGE (i:item {title:""}); + MATCH (l1:item {title:""}), (l2:module {title:""}) MERGE (l2)-[:LIEN]->(l1); - MERGE (i:Item {title:""}); - MATCH (l1:Item {title:""}), (l2:Item {title:""}) - CREATE (l1)-[:LIEN]->(l2); + MERGE (i:item {title:""}); + MATCH (l1:item {title:""}), (l2:item {title:""}) MERGE (l2)-[:LIEN]->(l1); + + + + \ No newline at end of file diff --git a/hdoc_to_opale/schema/hdoc1-xhtml.rng b/hdoc_to_opale/schema/hdoc1-xhtml.rng index 923ad40d418c656268dd99f0493bbbe4ae590e01..6e8d1ef9c67f2a011815734bdf75ea3e01f53737 100644 --- a/hdoc_to_opale/schema/hdoc1-xhtml.rng +++ b/hdoc_to_opale/schema/hdoc1-xhtml.rng @@ -195,6 +195,11 @@ + + + + + diff --git a/hdoc_to_opale/schema/type.rng b/hdoc_to_opale/schema/type.rng index da828ba3eb92fcbebf7fe27ede6637b762cb77a5..b278f0e6e9f3e34e38e529c91d564e77fef9f778 100644 --- a/hdoc_to_opale/schema/type.rng +++ b/hdoc_to_opale/schema/type.rng @@ -45,6 +45,8 @@ choice-correct choice-incorrect explanation + explanation-choice-correct + explanation-choice-incorrect diff --git a/hdoc_to_pdf/css/main.css b/hdoc_to_pdf/css/main.css new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/hdoc_to_pdf/font/README.md b/hdoc_to_pdf/font/README.md new file mode 100644 index 0000000000000000000000000000000000000000..e6250473985680d11b27f21362da3d2e37d2c43f --- /dev/null +++ b/hdoc_to_pdf/font/README.md @@ -0,0 +1,7 @@ +# Hdoc to PDF font selection + +The font used for PDF generation through FS is the **Computer Modern** font, the default LaTeX's one. Here are the main families to use : +- `cmunrm.ttf` for default text ; +- `cmunrd.ttf` for **bold** text ; +- `cmunti.ttf` for *italic/emphasis* text ; +- `cmuntt.ttf` for `code syntax`. diff --git a/hdoc_to_pdf/font/cm-unicode-0.7.0-ttf.tar.xz b/hdoc_to_pdf/font/cm-unicode-0.7.0-ttf.tar.xz new file mode 100644 index 0000000000000000000000000000000000000000..9fb1a8b022e249698856abff7e3e48fe090b69e1 Binary files /dev/null and b/hdoc_to_pdf/font/cm-unicode-0.7.0-ttf.tar.xz differ diff --git a/hdoc_to_pdf/font/cmunrb.ttf b/hdoc_to_pdf/font/cmunrb.ttf new file mode 100644 index 0000000000000000000000000000000000000000..d69b938a98957d5504c3ea3d22a01f08815d5ce6 Binary files /dev/null and b/hdoc_to_pdf/font/cmunrb.ttf differ diff --git a/hdoc_to_pdf/font/cmunrm.ttf b/hdoc_to_pdf/font/cmunrm.ttf new file mode 100644 index 0000000000000000000000000000000000000000..1c3fff0a6e9561646f39fe4f9216442e1b4d89fa Binary files /dev/null and b/hdoc_to_pdf/font/cmunrm.ttf differ diff --git a/hdoc_to_pdf/font/cmunti.ttf b/hdoc_to_pdf/font/cmunti.ttf new file mode 100644 index 0000000000000000000000000000000000000000..993d5c029f10a113cb697ac2bef4967e5e7caa28 Binary files /dev/null and b/hdoc_to_pdf/font/cmunti.ttf differ diff --git a/hdoc_to_pdf/font/cmuntt.ttf b/hdoc_to_pdf/font/cmuntt.ttf new file mode 100644 index 0000000000000000000000000000000000000000..1651877dbe1efee77c41824af8b11e4ec30a07ff Binary files /dev/null and b/hdoc_to_pdf/font/cmuntt.ttf differ diff --git a/hdoc_to_pdf/hdoc_to_pdf.ant b/hdoc_to_pdf/hdoc_to_pdf.ant index e87608ad25ae359a8d29037ff5f70ef0f3bf1f90..ea653f3b8626db723c6808f37f9c42f54d7839f1 100644 --- a/hdoc_to_pdf/hdoc_to_pdf.ant +++ b/hdoc_to_pdf/hdoc_to_pdf.ant @@ -1,61 +1,66 @@ - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - + + + + + + + - - + + - - + + - - - - + + + + + + + + - + + + diff --git a/hdoc_to_pdf/input/sample.hdoc b/hdoc_to_pdf/input/sample.hdoc index 3b4b40443f3fd32f9eef347d1029dd5e64729351..c161b5144c82fb15ad382692750da588f29601cf 100644 Binary files a/hdoc_to_pdf/input/sample.hdoc and b/hdoc_to_pdf/input/sample.hdoc differ diff --git a/hdoc_to_pdf/lib/MyPDFGenerator.jar b/hdoc_to_pdf/lib/MyPDFGenerator.jar new file mode 100644 index 0000000000000000000000000000000000000000..8c4b2625d8e42121615df0e729364ed1271514af Binary files /dev/null and b/hdoc_to_pdf/lib/MyPDFGenerator.jar differ diff --git a/hdoc_to_pdf/lib/core-renderer.jar b/hdoc_to_pdf/lib/core-renderer.jar new file mode 100644 index 0000000000000000000000000000000000000000..871fabf7b7eef372e62e0d9ac8bc095c2cd15f0c Binary files /dev/null and b/hdoc_to_pdf/lib/core-renderer.jar differ diff --git a/hdoc_to_pdf/lib/iText-2.0.8.jar b/hdoc_to_pdf/lib/iText-2.0.8.jar new file mode 100644 index 0000000000000000000000000000000000000000..aaf6296a23784cfb33610043af84b1bc7dd4fba3 Binary files /dev/null and b/hdoc_to_pdf/lib/iText-2.0.8.jar differ diff --git a/hdoc_to_pdf/prepare_hdoc.ant b/hdoc_to_pdf/prepare_hdoc.ant deleted file mode 100755 index 58b0caa25d573eb67242af33c4bfea5f92affdd5..0000000000000000000000000000000000000000 --- a/hdoc_to_pdf/prepare_hdoc.ant +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - diff --git a/hdoc_to_pdf/xsl/find_content.xsl b/hdoc_to_pdf/xsl/find_content.xsl index 7902dd683be77885739a8f75a9fe684402550655..08e5f9cdc438afdfcd386412ab9d4df159e7fa73 100644 --- a/hdoc_to_pdf/xsl/find_content.xsl +++ b/hdoc_to_pdf/xsl/find_content.xsl @@ -1,27 +1,58 @@  - - + + + + + - + - + - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/hdoc_to_pdf/xsl/hdoc_flattenizer.xsl b/hdoc_to_pdf/xsl/hdoc_flattenizer.xsl index 503e6cc02d38dd7b50246007e4638ed0d07ec1cf..5fc6f86955350ec5db47201b7a8af3557c3257c5 100644 --- a/hdoc_to_pdf/xsl/hdoc_flattenizer.xsl +++ b/hdoc_to_pdf/xsl/hdoc_flattenizer.xsl @@ -1,13 +1,56 @@  - + xmlns="http://www.w3.org/1999/xhtml" + > + + + + + + + + + - - Hello world ! + + + - + + + + + + stylesheet + text/css + css/main.css + + + + + + +
+ + + + +
+
+ + + + + + + + + + +
diff --git a/hdoc_to_pdf/xsl/last_transformer.xsl b/hdoc_to_pdf/xsl/last_transformer.xsl new file mode 100644 index 0000000000000000000000000000000000000000..5a2e02dc98019d5954138204019cd246f56715f0 --- /dev/null +++ b/hdoc_to_pdf/xsl/last_transformer.xsl @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + diff --git a/mindmapping_to_hdoc/input/sample.mm b/mindmapping_to_hdoc/input/sample.mm index 68e81de4877f06b932f35418941de016ed13344a..fd874f341d72a6f7e3ba803ac8ed5e11ff847fbe 100644 --- a/mindmapping_to_hdoc/input/sample.mm +++ b/mindmapping_to_hdoc/input/sample.mm @@ -1 +1,43 @@ - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/mindmapping_to_hdoc/run.bat b/mindmapping_to_hdoc/run.bat index 709e8b274fbb9729af6055b0f470c2679f38878c..f06eb0a6594d3b8dce2dcf0416ae2454c5acc194 100755 --- a/mindmapping_to_hdoc/run.bat +++ b/mindmapping_to_hdoc/run.bat @@ -3,12 +3,22 @@ set lib=lib set ant=mindmapping_to_hdoc.ant set antparam=-Dprogram.param=%1 set inputPath=%2 +SETLOCAL ENABLEEXTENSIONS set scJarList=%lib%\* -if defined %inputPath% java.exe -classpath "%scJarList%" -Xmx150m org.apache.tools.ant.Main -buildfile %ant% %antparam% -DinputPath %inputPath% +::java.exe -classpath "%scJarList%" -Xmx150m org.apache.tools.ant.Main -buildfile %ant% %antparam% + +if defined (%inputPath%) ( +pause +java.exe -classpath "%scJarList%" -Xmx150m org.apache.tools.ant.Main -buildfile %ant% %antparam% -DinputPath %inputPath% +pause +) + +if not defined (%inputPath%) ( pause -if not defined %inputPath% java.exe -classpath "%scJarList%" -Xmx150m org.apache.tools.ant.Main -buildfile %ant% %antparam% +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% diff --git a/mindmapping_to_hdoc/xslt/sect.xsl b/mindmapping_to_hdoc/xslt/sect.xsl index 446272d2e575a1717b25a4b897729edc03dbaaa5..a9ea582ab50ab3e34d432855980d882dd6773a5c 100755 --- a/mindmapping_to_hdoc/xslt/sect.xsl +++ b/mindmapping_to_hdoc/xslt/sect.xsl @@ -238,7 +238,58 @@
- + + + + + + QCM + + + question + + + + + + + + + + + + + + + + explanation + + + + + + + + + + choice-correct + + + + + + + + + + choice-incorrect + + + + + + + @@ -251,7 +302,7 @@ - + diff --git a/mindmapping_to_opale/README.md b/mindmapping_to_opale/README.md index 8df86c3ce1a194efa90a289b28edff2257f7191a..90a2794e4e9bec9fd9d96775b3a4987b4697fc1e 100644 --- a/mindmapping_to_opale/README.md +++ b/mindmapping_to_opale/README.md @@ -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. diff --git a/opale_to_hdoc/input/sample.scar b/opale_to_hdoc/input/sample.scar deleted file mode 100644 index 90aec82aafb55ffee9d03fa45ebb1513fed20734..0000000000000000000000000000000000000000 Binary files a/opale_to_hdoc/input/sample.scar and /dev/null differ diff --git a/opale_to_hdoc/xsl/find_ressources.xsl b/opale_to_hdoc/xsl/find_ressources.xsl index a4fef87a6a3e2936be8a13bfd11c1a8e1b3f3cb9..737db4497f5dc4e8a98fe7238e800c008cde16b8 100644 --- a/opale_to_hdoc/xsl/find_ressources.xsl +++ b/opale_to_hdoc/xsl/find_ressources.xsl @@ -24,6 +24,8 @@ + + \ No newline at end of file diff --git a/opale_to_hdoc/xsl/opale_to_hdoc_regle1.xsl b/opale_to_hdoc/xsl/opale_to_hdoc_regle1.xsl index 878b4ad0934b97947ebf752b4276041bc4728bb3..2edc9f50d4c57b46f18f376e0bccabb2fe18763d 100644 --- a/opale_to_hdoc/xsl/opale_to_hdoc_regle1.xsl +++ b/opale_to_hdoc/xsl/opale_to_hdoc_regle1.xsl @@ -28,6 +28,16 @@ + + + + + + + + + + diff --git a/opale_to_hdoc/xsl/opale_to_hdoc_regle2.xsl b/opale_to_hdoc/xsl/opale_to_hdoc_regle2.xsl index 90eaa6e3986c8d5ba12b1be0479913eaf5b130b5..996d2e274bdb5e87dbbc0e713c251f9025b834ef 100644 --- a/opale_to_hdoc/xsl/opale_to_hdoc_regle2.xsl +++ b/opale_to_hdoc/xsl/opale_to_hdoc_regle2.xsl @@ -265,7 +265,7 @@ - + diff --git a/wikipedia_to_hdoc/xslt/wiki_to_hdoc.xsl b/wikipedia_to_hdoc/xslt/wiki_to_hdoc.xsl index 1d6648921fb28dcf4833967fce1b3e76ebedf246..47f8dac0c747baf5d7132ec1466d4ccc4b4a3975 100644 --- a/wikipedia_to_hdoc/xslt/wiki_to_hdoc.xsl +++ b/wikipedia_to_hdoc/xslt/wiki_to_hdoc.xsl @@ -360,9 +360,13 @@ +<<<<<<< HEAD +======= + +>>>>>>> 9e71c9879b4cfdf2138a088b173de4011fd5869f - +