Commit 31ee91ec authored by jcomedouteau's avatar jcomedouteau

fix readme confict after merge

parents 9f3de201 c48dac70
......@@ -4,10 +4,12 @@
License GPL3.0
http://www.gnu.org/licenses/gpl-3.0.txt
## Crédits
## Credits
- 2015
- Jean-Côme Douteau
- Gabrielle Rit
- Jean Vintache
- 2014
- Fecherolle Cécile
## Presentation
......@@ -15,20 +17,20 @@ This module is able to convert several [etherpad](http://etherpad.org/) files (e
## User documentation
### Running etherpad_to_hdoc.ant
1. Create an etherpad document and export it as an html file.
1. please place your html files in the `/input` folder
2. run the `run.[bat|sh]` script of your choice depending on your OS
3. and retrieve the hdoc outputs in the `/output` folder
## Running etherpad_to_hdoc.ant
1. Create an etherpad document and export it as an html file.
2. please place your html files in the `/input` folder
3. run the `run.[bat|sh]` script of your choice depending on your OS
4. and retrieve the hdoc outputs in the `/output` folder
## Unsupported
- Markdown
- Author paternity
- Etherpad timeline
- Chat
- Markdown
- Author paternity
- Etherpad timeline
- Chat
## Known bugs
Nested lists in lists are not supported
- Nested lists in lists are not supported
Example :
`<ul>
<li>
......@@ -39,35 +41,37 @@ Example :
</ul>
</li>
<ul>`
- As a consequence, etherpad indentation is not supported because it is coded as nested lists.
## TODO
- Markdown
- Markdown
## Technical notes
### Description of etherpad_to_hdoc.ant
#### Prelude
- Importation of necessary classes (antlib, htmlcleaner, jing)
- Creation of directories architecture tree
- Importation of necessary classes (antlib, htmlcleaner, jing)
- Creation of directories architecture tree
#### Transformations
- Use of htmlcleaner to transform the input file from html to xhtml. For more info, see http://htmlcleaner.sourceforge.net/index.php.
- Apply html2xhtml.xsl : this xsl extracts the content into <body> tags
- Apply html2xhtmlv1.xsl : this xsl is used as a fix and adds br tag at the end of lists (ul and ol)
- Apply html2xhtmlv2.xsl : this xsl surround text line with p tags and transforms non-hdoc tags into hdoc tags as s, u, strong tags.
- Apply html2xhtml3.xsl : this xsl is used as a fix, it deletes p tags when its child is ul or ol
- Apply xhtml2hdoc.xsl : this xsl transforms the content into hdoc structure
- Use of htmlcleaner to transform the input file from html to xhtml. For more info, see http://htmlcleaner.sourceforge.net/index.php.
- Apply html2xhtml.xsl : this xsl extracts the content into <body> tags
- Apply html2xhtmlv1.xsl : this xsl is used as a fix and adds br tag at the end of lists (ul and ol)
- Apply html2xhtmlv2.xsl : this xsl surround text line with p tags and transforms non-hdoc tags into hdoc tags as s, u, strong tags.
- Apply html2xhtml3.xsl : this xsl is used as a fix, it deletes p tags when its child is ul or ol
- Apply xhtml2hdoc.xsl : this xsl transforms the content into hdoc structure
#### Post-transformations actions
- Build hdoc structure
- Jing checks if the output file is validated with the right rng schema
- Zip the directory into hdoc archive
- Build hdoc structure
- Jing checks if the output file is validated with the right rng schema
- Zip the directory into hdoc archive
### Supported tags
html tags -> hdoc tags
- u, s, em, strong -> em
- li -> li
- ol -> ol
- br -> p
- html tags -> hdoc tags
- u, s, em, strong -> em
- li -> li
- ol -> ol
- br -> p
## Capitalisation
We learned how to use xsl sheets with text file as an input : we had to use regular expressions to extract content.
\ No newline at end of file
......@@ -4,6 +4,6 @@ tmp = ${basedir}/tmp
xsl = ${basedir}/xsl
lib = ${basedir}/lib
log = ${basedir}/log
schema = ${basedir}/schema
schema = ../schemas
rootfilename = content.xml
\ No newline at end of file
<!doctype html>
<html lang="en">
<head>
<title>NF29_HdocEtherpad</title>
<meta charset="utf-8">
<style> * { font-family: arial, sans-serif;
font-size: 13px;
line-height: 17px; }ul.indent { list-style-type: none; }ol { list-style-type: none; padding-left:0;}body > ol { counter-reset: first second third fourth fifth sixth seventh eigth ninth tenth eleventh twelth thirteenth fourteenth fifteenth sixteenth; }ol > li:before {content: counter(first) ". " ;counter-increment: first;}ol > ol > li:before {content: counter(first) "." counter(second) ". " ;counter-increment: second;}ol > ol > ol > li:before {content: counter(first) "." counter(second) "." counter(third) ". ";counter-increment: third;}ol > ol > ol > ol > li:before {content: counter(first) "." counter(second) "." counter(third) "." counter(fourth) ". ";counter-increment: fourth;}ol > ol > ol > ol > ol > li:before {content: counter(first) "." counter(second) "." counter(third) "." counter(fourth) "." counter(fifth) ". ";counter-increment: fifth;}ol > ol > ol > ol > ol > ol > li:before {content: counter(first) "." counter(second) "." counter(third) "." counter(fourth) "." counter(fifth) "." counter(sixth) ". ";counter-increment: sixth;}ol > ol > ol > ol > ol > ol > ol > li:before {content: counter(first) "." counter(second) "." counter(third) "." counter(fourth) "." counter(fifth) "." counter(sixth) "." counter(seventh) ". ";counter-increment: seventh;}ol > ol > ol > ol > ol > ol > ol > ol > li:before {content: counter(first) "." counter(second) "." counter(third) "." counter(fourth) "." counter(fifth) "." counter(sixth) "." counter(seventh) "." counter(eigth) ". ";counter-increment: eigth;}ol > ol > ol > ol > ol > ol > ol > ol > ol > li:before {content: counter(first) "." counter(second) "." counter(third) "." counter(fourth) "." counter(fifth) "." counter(sixth) "." counter(seventh) "." counter(eigth) "." counter(ninth) ". ";counter-increment: ninth;}ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > li:before {content: counter(first) "." counter(second) "." counter(third) "." counter(fourth) "." counter(fifth) "." counter(sixth) "." counter(seventh) "." counter(eigth) "." counter(ninth) "." counter(tenth) ". ";counter-increment: tenth;}ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > li:before {content: counter(first) "." counter(second) "." counter(third) "." counter(fourth) "." counter(fifth) "." counter(sixth) "." counter(seventh) "." counter(eigth) "." counter(ninth) "." counter(tenth) "." counter(eleventh) ". ";counter-increment: eleventh;}ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > li:before {content: counter(first) "." counter(second) "." counter(third) "." counter(fourth) "." counter(fifth) "." counter(sixth) "." counter(seventh) "." counter(eigth) "." counter(ninth) "." counter(tenth) "." counter(eleventh) "." counter(twelth) ". ";counter-increment: twelth;}ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > li:before {content: counter(first) "." counter(second) "." counter(third) "." counter(fourth) "." counter(fifth) "." counter(sixth) "." counter(seventh) "." counter(eigth) "." counter(ninth) "." counter(tenth) "." counter(eleventh) "." counter(twelth) "." counter(thirteenth) ". ";counter-increment: thirteenth;}ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > li:before {content: counter(first) "." counter(second) "." counter(third) "." counter(fourth) "." counter(fifth) "." counter(sixth) "." counter(seventh) "." counter(eigth) "." counter(ninth) "." counter(tenth) "." counter(eleventh) "." counter(twelth) "." counter(thirteenth) "." counter(fourteenth) ". ";counter-increment: fourteenth;}ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > li:before {content: counter(first) "." counter(second) "." counter(third) "." counter(fourth) "." counter(fifth) "." counter(sixth) "." counter(seventh) "." counter(eigth) "." counter(ninth) "." counter(tenth) "." counter(eleventh) "." counter(twelth) "." counter(thirteenth) "." counter(fourteenth) "." counter(fifteenth) ". ";counter-increment: fifteenth;}ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > li:before {content: counter(first) "." counter(second) "." counter(third) "." counter(fourth) "." counter(fifth) "." counter(sixth) "." counter(seventh) "." counter(eigth) "." counter(ninth) "." counter(tenth) "." counter(eleventh) "." counter(twelth) "." counter(thirteenth) "." counter(fourteenth) "." counter(fifteenth) "." counter(sixthteenth) ". ";counter-increment: sixthteenth;}ol{ text-indent: 0px; }ol > ol{ text-indent: 10px; }ol > ol > ol{ text-indent: 20px; }ol > ol > ol > ol{ text-indent: 30px; }ol > ol > ol > ol > ol{ text-indent: 40px; }ol > ol > ol > ol > ol > ol{ text-indent: 50px; }ol > ol > ol > ol > ol > ol > ol{ text-indent: 60px; }ol > ol > ol > ol > ol > ol > ol > ol{ text-indent: 70px; }ol > ol > ol > ol > ol > ol > ol > ol > ol{ text-indent: 80px; }ol > ol > ol > ol > ol > ol > ol > ol > ol > ol{ text-indent: 90px; }ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol{ text-indent: 100px; }ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol{ text-indent: 110px; }ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol { text-indent: 120px; }ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol{ text-indent: 130px; }ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol{ text-indent: 140px; }ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol > ol{ text-indent: 150px; }</style>
</head>
<body><em><s><u>Liens utiles :</u></s></em><br>gitlab : <a href="https&#x3a;&#x2F;&#x2F;gitlab&#x2e;utc&#x2e;fr&#x2F;crozatst&#x2F;hdoc">https:&#x2F;&#x2F;gitlab.utc.fr&#x2F;crozatst&#x2F;hdoc</a><br>hdoc : <a href="http&#x3a;&#x2F;&#x2F;hdoc&#x2e;crzt&#x2e;fr&#x2F;2014&#x2F;co&#x2F;hdocConverter&#x2e;html">http:&#x2F;&#x2F;hdoc.crzt.fr&#x2F;2014&#x2F;co&#x2F;hdocConverter.html</a><br>hdoc etherpad converter : <a href="http&#x3a;&#x2F;&#x2F;hdoc&#x2e;crzt&#x2e;fr&#x2F;2014&#x2F;co&#x2F;etherpad&#x2e;html">http:&#x2F;&#x2F;hdoc.crzt.fr&#x2F;2014&#x2F;co&#x2F;etherpad.html</a><br>informations sur le format hdoc : <a href="http&#x3a;&#x2F;&#x2F;hdoc&#x2e;crzt&#x2e;fr&#x2F;2014&#x2F;co&#x2F;hdoc&#x2e;html">http:&#x2F;&#x2F;hdoc.crzt.fr&#x2F;2014&#x2F;co&#x2F;hdoc.html</a><br>Changeset : <a href="http&#x3a;&#x2F;&#x2F;policypad&#x2e;readthedocs&#x2e;org&#x2F;en&#x2F;latest&#x2F;changesets&#x2e;html">http:&#x2F;&#x2F;policypad.readthedocs.org&#x2F;en&#x2F;latest&#x2F;changesets.html</a><br><br><ol class="number"><li><strong>Product Backlog</strong></li><li><strong>Lister les t&#226;ches &#224; r&#233;aliser pour am&#233;liorer le module actuel, et &#233;valuer leur dur&#233;e de r&#233;alisation.</strong></li><li><strong>D&#233;passer le volume horaire disponible, soit 18 h&#x2F;pers * 3 pers = 54h</strong></li></ol><br><ul class="bullet"><li>*markdown*</li><li>Prise en main du projet (1h)</li></ul>Configurer Git (1h)<br><br><ul class="indent"><li>Restructuration antce (1h)</li><li>Etude du sch&#233;ma Hdoc (3h)</li></ul>Etude du sch&#233;ma etherpad (3h)<br><em>Etudier les possibilit&#233;s d&#x27;xsl avec en entr&#233;e un fichier texte (3h)</em><br><em>Etudier les possibilit&#233;s d&#x27;xsl en terme d&#x27;expressions r&#233;guli&#232;res (2h)</em><br><em>Analyse de ce qu&#x27;ils faut enlever des fichiers .etherpad (2h)</em><br>R&#233;&#233;crire les fonctionalit&#233;s du script perl dans le XSL. (5h)<br>Identifier pourquoi le projet actuel ne correspond pas au format HDoc (2h)<br>Corriger le projet pour que la sortie corresponde au sch&#233;ma HDoc (10h)<br>Etudier la solution MarkDown et comment l&#x27;impl&#233;menter (3h)<br>Impl&#233;menter l&#x27;utilisation des balises Markdown dans etherpad. (3h)<br>Analyser comment fonctionne la notion d&#x27;auteur dans etherpad et comment l&#x27;impl&#233;menter en Hdoc (3h)<br>Impl&#233;menter une mise en forme en Hdoc pour distinguer ce que les diff&#233;rents auteurs ont &#233;crits ( {&amp; author text &amp;} (3h)<br>Corriger le projet pour avoir un format Hdoc destination compatible avec les modules Opale et Optim (3h)<br>Creer les applications de etherpad vers Optim&#x2F;Opale en utilisant les modules existants (3h)<br>Rendre compte des t&#226;ches r&#233;alis&#233;es et de la TODO restante &#224; la fin de la p&#233;riode (1h)<br>Comprendre en quoi l&#x27;ancien site web d&#x27;exemple est consid&#233;r&#233; obsol&#232;te (1h)<br>Mettre &#224; niveau le site web d&#x27;exemple (1h)<br>Mise &#224; jour de la rubrique correspondant au projet sur le site Hdoc (1h)<br>R&#233;aliser un rapport de projet (2h)<br><br><br>XSL1 du html a xHTML<br>-&gt; fermer les br.<br>-&gt; enlever la balise meta<br><s>-&gt;rajouter attribut type=&#x27;css&#x27; dans la balilse style.</s><br>-&gt;Rajouter une balise &lt;div&gt; &#224; la fin et au d&#233;but du texte<br><ul class="indent"><li><br></li></ul>XSL2 du xHTML &#224; HDOC<br><br><br>A la fin, on doit livrer quoi ? Application ? Antce ?<br><br>-de etherpad vers hdoc<br><br>Et en plus potentiellement de etherpad vers d&#x27;autres modules (Optim ou Opale par exemple) qui utilisent ces deux premi&#232;res applications directement.<br>Oui non &#224; priori y&#x27;a pas de hdoc vers etherpad<br>La chaine vis&#233;e c&#x27;est Etherpad - Hdoc - Optim&#x2F;Opale<br></body>
</html>
<?xml version="1.0" encoding="UTF-8"?>
<grammar
xmlns="http://relaxng.org/ns/structure/1.0"
xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
ns="urn:utc.fr:ics:hdoc:container"
>
<a:documentation>This schema describes the META-INF/container.xml file for hdoc format</a:documentation>
<a:documentation>This schema is a derivation of http://www.idpf.org/epub/30/schema/ocf-container-30.rnc
from EPUB Open Container Format (http://www.idpf.org/epub/30/spec/epub30-ocf.html)
</a:documentation>
<start>
<element name="container">
<attribute name="version">
<value>1.0</value>
</attribute>
<element name="rootfiles">
<element name="rootfile">
<attribute name="full-path">
<data type="anyURI"/>
</attribute>
<attribute name="media-type">
<value>text/xml</value>
</attribute>
</element>
</element>
</element>
</start>
</grammar>
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8"?>
<grammar xmlns="http://relaxng.org/ns/structure/1.0"
xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
ns="http://www.utc.fr/ics/hdoc/xhtml">
<a:documentation>Last update : 2014-12-04</a:documentation>
<a:documentation>Changes since last update :
In order to manage quiz :
- Adding multiple-choice-question and fill-in-the-blank to section
- Adding question, choice-correct, choice-uncorrect and explanation to div
- Adding blank to span
- Externalizing ObjectType and VideoType from main schema
</a:documentation>
<!-- Type Microdata -->
<define name="SectionType">
<optional>
<attribute name="data-hdoc-type">
<choice>
<value>introduction</value>
<value>conclusion</value>
<value>unit-of-content</value>
<value>multiple-choice-question</value>
<value>fill-in-the-blank</value>
</choice>
</attribute>
</optional>
</define>
<define name="DivType">
<optional>
<attribute name="data-hdoc-type">
<choice>
<!-- block management -->
<value>emphasis</value>
<value>complement</value>
<value>definition</value>
<value>example</value>
<value>remark</value>
<value>warning</value>
<value>advice</value>
<!-- quiz management -->
<value>question</value>
<value>choice-correct</value>
<value>choice-incorrect</value>
<value>explanation</value>
</choice>
</attribute>
</optional>
</define>
<define name="SpanType">
<optional>
<attribute name="data-hdoc-type">
<choice>
<value>syntax</value>
<value>latex</value>
<!-- quiz management -->
<value>blank</value>
</choice>
</attribute>
</optional>
</define>
<define name="ObjectType">
<attribute name="type">
<choice>
<value>application/vnd.oasis.opendocument.graphics </value>
<value>application/vnd.oasis.opendocument.spreadsheet</value>
<value>application/pdf</value>
</choice>
</attribute>
</define>
<define name="VideoType">
<attribute name="type">
<choice>
<value>video/mp4</value>
<value>video/ogg</value>
<value>video/webm</value>
</choice>
</attribute>
</define>
</grammar>
......@@ -4,32 +4,45 @@
## Credits
- Rit Gabrielle
- Vintache Jean
<<<<<<< HEAD
- Douteau Jean-Come
- Fecherolle Cecile (2014)
##Presentation
=======
- Douteau Jean-Côme
- Fecherolle Cécile (2014)
## Presentation
>>>>>>> c48dac707699113384445195f6949017212e8164
How to transform an etherpad document in lexique document.
Filepath in this document are relative to this file readme.
## Dependence
- Etherpad2Hdoc
- Hdoc2Lexique
## User Documentation
1. Download an etherpad document in html format.
1. Create or join an etherpad document then export it in html format (Import/Export Button) in the `/input` directory (if the directory does not exists, you have to create it).
2. Name it pad.html
2. Execute the file `/run.bat` or `/run.sh` depending on the OS. A `.scar` file is created in the directory `/output`
*If the `/input` directory contains multiple files, they won't be all treated.
*If the `/input` directory contains multiple files, they won't be all treated.*
3. Open the document with Scenari
1. Open Scenari, and choose "UTC-etu_lexique" as distant depot.
2. Go in the directory `sandBox/etherpad-to-lexique.`
3. Import your `.scar` file in the directory.
4. Open the file Main.xml created.
##Unsupported
## Unsupported
- MarkDown
- Timeline and author paternity
- Chat
##Known bugs
## Known bugs
Nested lists in lists are not supported
example :
Example :
`<ul>
<li>
<ul>
......@@ -43,33 +56,29 @@ example :
## TODO
- Work with markdown
- Correct nested lists
## Technical notes
### Description of etherpad_to_hdoc.ant
#### Prelude
- Importation of necessary classes (antlib, htmlcleaner, jing)
- Creation of directories architecture tree
- Importation of necessary classes (antlib, htmlcleaner, jing)
- Creation of directories architecture tree
#### Transformations
- Use of htmlcleaner to transform the input file from html to xhtml. For more info, see http://htmlcleaner.sourceforge.net/index.php.
- Apply html2xhtml.xsl : this xsl extracts the content into <body> tags
- Apply html2xhtmlv1.xsl : this xsl is used as a fix and adds br tag at the end of lists (ul and ol)
- Apply html2xhtmlv2.xsl : this xsl surround text line with p tags and transforms non-hdoc tags into hdoc tags as s, u, strong tags.
- Apply html2xhtml3.xsl : this xsl is used as a fix, it deletes p tags when its child is ul or ol
- Apply xhtml2hdoc.xsl : this xsl transforms the content into hdoc structure
- Use of htmlcleaner to transform the input file from html to xhtml. For more info, see http://htmlcleaner.sourceforge.net/index.php.
- Apply html2xhtml.xsl : this xsl extracts the content into <body> tags
- Apply html2xhtmlv1.xsl : this xsl is used as a fix and adds br tag at the end of lists (ul and ol)
- Apply html2xhtmlv2.xsl : this xsl surround text line with p tags and transforms non-hdoc tags into hdoc tags as s, u, strong tags.
- Apply html2xhtml3.xsl : this xsl is used as a fix, it deletes p tags when its child is ul or ol
- Apply xhtml2hdoc.xsl : this xsl transforms the content into hdoc structure
#### Post-transformations actions
- Build hdoc structure
- Jing checks if the output file is validated with the right rng schema
- Zip the directory into hdoc archive
- Build hdoc structure
- Jing checks if the output file is validated with the right rng schema
- Zip the directory into hdoc archive
## Capitalisation
We have to change how we get the input file:
1 Get the first file of the input directory
2 Make the run with the name of the file as parameter
Finally, ant should be changed to manage multiple entries
\ No newline at end of file
......@@ -26,7 +26,9 @@
</fileset>
</delete>
<copy file="input/pad.html" todir="${eth_in}"/>
<exec dir="../etherpad_to_hdoc" executable="run.sh"/>
<exec executable="/bin/bash" dir="../etherpad_to_hdoc">
<arg value="../etherpad_to_hdoc/run.sh"/>
</exec>
</target>
<target name="to_lex_unix" if="${is_unix}">
......@@ -35,8 +37,10 @@
<include name="*.hdoc"/>
</fileset>
</delete>
<copy file="${eth_out}/output.hdoc" todir="${lex_in}"/>
<exec dir="../hdoc_to_lexique" executable="run.sh"/>
<copy file="${eth_out}/pad.hdoc" todir="${lex_in}"/>
<exec executable="/bin/bash" dir="../hdoc_to_lexique">
<arg value="../hdoc_to_lexique/run.sh"/>
</exec>
<copy file="${lex_out}/*.scar" todir="output"/>
</target>
......@@ -46,7 +50,7 @@
<include name="*.hdoc"/>
</fileset>
</delete>
<copy file="${eth_out}/output.hdoc" todir="${lex_in}"/>
<copy file="${eth_out}/pad.hdoc" todir="${lex_in}"/>
<exec dir="../hdoc_to_lexique" executable="run.bat"/>
<mkdir dir="output"/>
<copy todir="output">
......
......@@ -4,14 +4,25 @@
## Credits
- Rit Gabrielle
- Vintache Jean
<<<<<<< HEAD
- Douteau Jean-Come
- Fecherolle Cecile (2014)
##Presentation
=======
- Douteau Jean-Côme
- Fecherolle Cécile (2014)
## Presentation
>>>>>>> c48dac707699113384445195f6949017212e8164
How to transform an etherpad document in opale document.
Filepath in this document are relative to this file readme.
Filepaths in this document are relative to this readme file.
## Dependence
- Etherpad2Hdoc
- Hdoc2Opale
## User Documentation
1. Download an etherpad document in html format.
1. Create or join an etherpad document then export it in html format (Import/Export Button) in the `/input` directory (if the directory does not exists, you have to create it).
......@@ -22,13 +33,17 @@ Filepath in this document are relative to this file readme.
2. Go in the directory `sandBox/etherpad-to-opale.`
3. Import your `.scar` file in the directory.
4. Open the file Main.xml created.
##Unsupported
## Unsupported
- MarkDown
- Timeline and author paternity
- Chat
##Known bugs
Nested lists in lists are not supported
example :
## Known bugs
Nested lists in lists are not supported.
Here's an example :
`<ul>
<li>
<ul>
......@@ -42,32 +57,29 @@ example :
## TODO
- Work with markdown
- Correct nested lists
## Technical notes
### Description of etherpad_to_hdoc.ant
#### Prelude
- Importation of necessary classes (antlib, htmlcleaner, jing)
- Creation of directories architecture tree
- Importation of necessary classes (antlib, htmlcleaner, jing)
- Creation of directories architecture tree
#### Transformations
- Use of htmlcleaner to transform the input file from html to xhtml. For more info, see http://htmlcleaner.sourceforge.net/index.php.
- Apply html2xhtml.xsl : this xsl extracts the content into <body> tags
- Apply html2xhtmlv1.xsl : this xsl is used as a fix and adds br tag at the end of lists (ul and ol)
- Apply html2xhtmlv2.xsl : this xsl surround text line with p tags and transforms non-hdoc tags into hdoc tags as s, u, strong tags.
- Apply html2xhtml3.xsl : this xsl is used as a fix, it deletes p tags when its child is ul or ol
- Apply xhtml2hdoc.xsl : this xsl transforms the content into hdoc structure
- Use of htmlcleaner to transform the input file from html to xhtml. For more info, see http://htmlcleaner.sourceforge.net/index.php.
- Apply html2xhtml.xsl : this xsl extracts the content into <body> tags
- Apply html2xhtmlv1.xsl : this xsl is used as a fix and adds br tag at the end of lists (ul and ol)
- Apply html2xhtmlv2.xsl : this xsl surround text line with p tags and transforms non-hdoc tags into hdoc tags as s, u, strong tags.
- Apply html2xhtml3.xsl : this xsl is used as a fix, it deletes p tags when its child is ul or ol
- Apply xhtml2hdoc.xsl : this xsl transforms the content into hdoc structure
#### Post-transformations actions
- Build hdoc structure
- Jing checks if the output file is validated with the right rng schema
- Zip the directory into hdoc archive
- Build hdoc structure
- Jing checks if the output file is validated with the right rng schema
- Zip the directory into hdoc archive
## Capitalisation
We have to change how we get the input file:
1 Get the first file of the input directory
2 Make the run with the name of the file as parameter
Finally, ant should be changed to manage multiple entries
\ No newline at end of file
......@@ -10,6 +10,10 @@
</condition>
<target name="to_hdoc_init">
</target>
<target name="to_hdoc_windows" if="${is_windows}">
<delete>
<fileset dir="${eth_in}">
<include name="*.html"/>
......@@ -20,17 +24,29 @@
<include name="*.html"/>
</fileset>
</copy>
</target>
<target name="to_hdoc_windows" if="${is_windows}">
<exec dir="../etherpad_to_hdoc" executable="run.bat"/>
</target>
<target name="to_hdoc_unix" if="${is_unix}">
<exec dir="../etherpad_to_hdoc" executable="run.sh"/>
<delete>
<fileset dir="${eth_in}">
<include name="*.html"/>
</fileset>
</delete>
<copy todir="${eth_in}">
<fileset dir="${in}">
<include name="*.html"/>
</fileset>
</copy>
<exec executable="/bin/bash" dir="../etherpad_to_hdoc">
<arg value="../etherpad_to_hdoc/run.sh"/>
</exec>
</target>
<target name="to_opale_init">
</target>
<target name="to_opale_unix" if="${is_unix}">
<delete>
<fileset dir="${opa_in}">
<include name="*.hdoc"/>
......@@ -39,13 +55,20 @@
<copy todir="${opa_in}">
<fileset dir="${eth_out}"/>
</copy>
</target>
<target name="to_opale_unix" if="${is_unix}">
<exec dir="../hdoc_to_opale" executable="run.sh"/>
<exec executable="/bin/bash" dir="../hdoc_to_opale">
<arg value="../hdoc_to_opale/run.sh"/>
</exec>
</target>
<target name="to_opale_windows" if="${is_windows}">
<delete>
<fileset dir="${opa_in}">
<include name="*.hdoc"/>
</fileset>
</delete>
<copy todir="${opa_in}">
<fileset dir="${eth_out}"/>
</copy>
<exec dir="../hdoc_to_opale" executable="run.bat"/>
</target>
......
......@@ -4,32 +4,46 @@
## Credits
- Rit Gabrielle
- Vintache Jean
<<<<<<< HEAD
- Douteau Jean-Come
- Fecherolle Cecile (2014)
##Presentation
=======
- Douteau Jean-Côme
- Fecherolle Cécile (2014)
## Presentation
>>>>>>> c48dac707699113384445195f6949017212e8164
How to transform an etherpad document in optim document.
Filepath in this document are relative to this file readme.
## Dependence
- Etherpad2Hdoc
- Hdoc2Optim
## User Documentation
1. Download an etherpad document in html format.
1. Create or join an etherpad document then export it in html format (Import/Export Button) in the `/input` directory (if the directory does not exists, you have to create it).
2. Name it pad.html
2. Execute the file `/run.bat` or `/run.sh` depending on the OS. A `.scar` file is created in the directory `/output`
*If the `/input` directory contains multiple files, they won't be all treated.
*If the `/input` directory contains multiple files, they won't be all treated.*
3. Open the document with Scenari
1. Open Scenari, and choose "UTC-etu_optim" as distant depot.
2. Go in the directory `sandBox/etherpad-to-otpim.`
3. Import your `.scar` file in the directory.
4. Open the file Main.xml created.
##Unsupported
## Unsupported
- MarkDown
- Timeline and author paternity
- Chat
##Known bugs
Nested lists in lists are not supported
example :
## Known bugs
Nested lists in lists are not supported.
Example :
`<ul>
<li>
<ul>
......@@ -43,20 +57,21 @@ example :
## TODO
- Work with markdown
- Correct nested lists
## Technical notes
### Description of etherpad_to_hdoc.ant
#### Prelude
- Importation of necessary classes (antlib, htmlcleaner, jing)
- Creation of directories architecture tree