Commit 8197a245 authored by jcomedouteau's avatar jcomedouteau

readme ehterpad2Opale

parent 802a40b8
# Etherpad To Opale -- HDOC CONVERTER PROJECT # Etherpad2Opale -- HDOC CONVERTER PROJECT
Comment récupérer un document de type Etherpad et le transformer en document opale. ## License
[GPL 3.0](http://www.gnu.org/licenses/gpl-3.0.txt)
*les chemins d'accès indiqués sont relatifs à ce fichier readme* ## Credits
- Rit Gabrielle
1. Télécharger un document Etherpad en format HTML - Vintache Jean
1. Créer ou rejoindre un document etherpad puis l'exporter sous un format html (bouton `Importer/Exporter`) dans le dossier `/input` (si le dossier n'existe pas, le créer) - Douteau Jean-Côme
2. Exécuter le fichier `/run.bat` ou `/run.sh` selon l'OS ; un fichier `.scar` est créé dans le dossier `/output` - Fecherolle Cécile (2014)
*si le dossier `/input` contient plusieurs fichiers html, ils sont tous traités* ##Presentation
3. Ouvrir le document produit avec opale How to transform an etherpad document in opale document.
1. Ouvrir Scenari, ouvrir la liste des entrepôts distants et choisir UTC-etu_opale. Filepath in this document are relative to this file readme.
2. Aller dans le dossier sandBox/etherpad-to-opale. ## Dependence
3. Réaliser un cliquer glisser avec votre fichier `.scar` dans le dossier ou bien faire un clic droit sur le dossier puis Importer. - Etherpad2Hdoc
4. Ouvrir le fichier Main.xml nouvellement créé. - 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).
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 will be all treated.
3. Open the document with Opale
1. Open Scenari, and choose "UTC-etu_opale" as distant depot.
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
- MarkDown
- Timeline and author paternity
- Chat
##Known bugs
Nested lists in lists are not supported
example :
`<ul>
<li>
<ul>
<li>
Never gonna give you up.
</li>
</ul>
</li>
<ul>`
## 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
#### 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
#### 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
## Capitalisation
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