README.md 2.64 KB
Newer Older
1
# Etherpad2Lexique -- HDOC CONVERTER PROJECT
jcomedouteau's avatar
jcomedouteau committed
2 3 4 5 6
## License
[GPL 3.0](http://www.gnu.org/licenses/gpl-3.0.txt)
## Credits
- Rit Gabrielle
- Vintache Jean
7
<<<<<<< HEAD
8 9
- Douteau Jean-Come
- Fecherolle Cecile (2014)
jcomedouteau's avatar
jcomedouteau committed
10
##Presentation
11
=======
Jean Vintache's avatar
Jean Vintache committed
12 13
- Douteau Jean-Côme
- Fecherolle Cécile (2014)
Jean Vintache's avatar
Jean Vintache committed
14

Jean Vintache's avatar
Jean Vintache committed
15
## Presentation
16
>>>>>>> c48dac707699113384445195f6949017212e8164
jcomedouteau's avatar
jcomedouteau committed
17
How to transform an etherpad document in lexique document.
Jean Vintache's avatar
Jean Vintache committed
18

jcomedouteau's avatar
jcomedouteau committed
19 20 21 22
Filepath in this document are relative to this file readme.
## Dependence
- Etherpad2Hdoc
- Hdoc2Lexique
Jean Vintache's avatar
Jean Vintache committed
23

jcomedouteau's avatar
jcomedouteau committed
24 25 26 27 28
## 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`
Jean Vintache's avatar
Jean Vintache committed
29
*If the `/input` directory contains multiple files, they won't be all treated.*
jcomedouteau's avatar
jcomedouteau committed
30 31 32 33 34
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.
Jean Vintache's avatar
Jean Vintache committed
35

Jean Vintache's avatar
Jean Vintache committed
36
## Unsupported
jcomedouteau's avatar
jcomedouteau committed
37 38 39
- MarkDown
- Timeline and author paternity
- Chat
Jean Vintache's avatar
Jean Vintache committed
40

Jean Vintache's avatar
Jean Vintache committed
41
## Known bugs
jcomedouteau's avatar
jcomedouteau committed
42
Nested lists in lists are not supported
Jean Vintache's avatar
Jean Vintache committed
43 44 45

Example :

jcomedouteau's avatar
jcomedouteau committed
46 47 48 49 50 51 52 53 54 55 56 57 58
`<ul>
	<li>
		<ul>
			<li>
			Never gonna let you down.
			</li>
		</ul>
	</li>
<ul>`

## TODO
- Work with markdown
- Correct nested lists
Jean Vintache's avatar
Jean Vintache committed
59

jcomedouteau's avatar
jcomedouteau committed
60 61 62 63
## Technical notes
### Description of etherpad_to_hdoc.ant

#### Prelude
Jean Vintache's avatar
Jean Vintache committed
64 65
- Importation of necessary classes (antlib, htmlcleaner, jing)
- Creation of directories architecture tree
jcomedouteau's avatar
jcomedouteau committed
66 67

#### Transformations
Jean Vintache's avatar
Jean Vintache committed
68 69 70 71 72 73
- 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
jcomedouteau's avatar
jcomedouteau committed
74 75

#### Post-transformations actions
Jean Vintache's avatar
Jean Vintache committed
76 77 78
- Build hdoc structure
- Jing checks if the output file is validated with the right rng schema
- Zip the directory into hdoc archive
jcomedouteau's avatar
jcomedouteau committed
79 80

## Capitalisation
81 82 83
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
84
Finally, ant should be changed to manage multiple entries