Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
hdoc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Stephane Crozat
hdoc
Commits
78d41803
Commit
78d41803
authored
Jan 04, 2016
by
crzt
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://gitlab.utc.fr/crozatst/hdoc
parents
8db0234f
802a40b8
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
60 additions
and
13 deletions
+60
-13
etherpad_to_hdoc/README.md
etherpad_to_hdoc/README.md
+52
-5
hdoc_to_opale/xsl/moveRessourceFiles.xsl
hdoc_to_opale/xsl/moveRessourceFiles.xsl
+6
-6
hdoc_to_opale/xsl/prepareCourseUcCopies.xsl
hdoc_to_opale/xsl/prepareCourseUcCopies.xsl
+1
-1
hdoc_to_opale/xsl/transformation0.xsl
hdoc_to_opale/xsl/transformation0.xsl
+1
-1
No files found.
etherpad_to_hdoc/README.md
100644 → 100755
View file @
78d41803
# Etherpad to Hdoc -- HDOC CONVERTER PROJECT
# Converter etherpad_to_hdoc
## [TL;DR](http://i.imgur.com/18B7f07.jpg)
-
This module is able to convert several
[
etherpad
](
http://etherpad.org/
)
files (exported as html files) to the hdoc format.
## License
-
To do so :
License GPL3.0
1.
please place your html files in the
`/input`
folder
http://www.gnu.org/licenses/gpl-3.0.txt
## Crédits
-
Jean-Côme Douteau
-
Gabrielle Rit
-
Jean Vintache
-
Fecherolle Cécile
## Presentation
This module is able to convert several
[
etherpad
](
http://etherpad.org/
)
files (exported as html files) to the hdoc format.
## 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
2.
run the
`run.[bat|sh]`
script of your choice depending on your OS
3.
and retrieve the hdoc outputs in the
`/output`
folder
3.
and retrieve the hdoc outputs in the
`/output`
folder
## Unsupported
-
Markdown
-
Author paternity
-
Etherpad timeline
-
Chat
## Known bugs
## TODO
## 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
\ No newline at end of file
hdoc_to_opale/xsl/moveRessourceFiles.xsl
View file @
78d41803
...
@@ -5,14 +5,14 @@
...
@@ -5,14 +5,14 @@
>
>
<xsl:output
method=
"xml"
indent=
"yes"
encoding=
"UTF-8"
/>
<xsl:output
method=
"xml"
indent=
"yes"
encoding=
"UTF-8"
/>
<xsl:param
name=
"filename"
/>
<xsl:param
name=
"filename"
/>
<!-- This template matches the root and create a ANT project, the root of any ANT buildfile. -->
<!-- This template matches the root and create a ANT project, the root of any ANT buildfile. -->
<xsl:template
match=
"h:html"
>
<xsl:template
match=
"h:html"
>
<project
name=
"moveRessourceFiles"
basedir=
"."
default=
"moveRessourceFiles"
>
<project
name=
"moveRessourceFiles"
basedir=
"."
default=
"moveRessourceFiles"
>
<property
file=
"global.properties"
/>
<property
file=
"global.properties"
/>
<property
name=
"filename"
location=
"{$filename}"
/>
<property
name=
"filename
2
"
location=
"{$filename}"
/>
<target
name=
"moveRessourceFiles"
>
<target
name=
"moveRessourceFiles"
>
<xsl:apply-templates
select=
"./*"
/>
<xsl:apply-templates
select=
"./*"
/>
</target>
</target>
...
@@ -32,16 +32,16 @@
...
@@ -32,16 +32,16 @@
<!-- Targeted markups. -->
<!-- Targeted markups. -->
<xsl:template
match=
"h:img"
>
<xsl:template
match=
"h:img"
>
<copy
tofile=
"${{filename
}}/decompressedOpale/res/{./@src}"
file=
"${{filename
}}/decompressedHdoc/{./@src}"
/>
<copy
tofile=
"${{filename
2}}/decompressedOpale/res/{./@src}"
file=
"${{filename2
}}/decompressedHdoc/{./@src}"
/>
</xsl:template>
</xsl:template>
<xsl:template
match=
"h:audio"
>
<xsl:template
match=
"h:audio"
>
<copy
tofile=
"${{filename
}}/decompressedOpale/res/{./@src}"
file=
"${{filename
}}/decompressedHdoc/{./@src}"
/>
<copy
tofile=
"${{filename
2}}/decompressedOpale/res/{./@src}"
file=
"${{filename2
}}/decompressedHdoc/{./@src}"
/>
</xsl:template>
</xsl:template>
<xsl:template
match=
"h:video"
>
<xsl:template
match=
"h:video"
>
<copy
tofile=
"${{filename
}}/decompressedOpale/res/{./@src}"
file=
"${{filename
}}/decompressedHdoc/{./@src}"
/>
<copy
tofile=
"${{filename
2}}/decompressedOpale/res/{./@src}"
file=
"${{filename2
}}/decompressedHdoc/{./@src}"
/>
</xsl:template>
</xsl:template>
<xsl:template
match=
"h:object"
>
<xsl:template
match=
"h:object"
>
<copy
tofile=
"${{filename
}}/decompressedOpale/res/{./@data}"
file=
"${{filename
}}/decompressedHdoc/{./@data}"
/>
<copy
tofile=
"${{filename
2}}/decompressedOpale/res/{./@data}"
file=
"${{filename2
}}/decompressedHdoc/{./@data}"
/>
</xsl:template>
</xsl:template>
<!-- These markups are matched in order to minimize "apply-templates" side-effects (i.e. their contents are not relevant for this transformation). -->
<!-- These markups are matched in order to minimize "apply-templates" side-effects (i.e. their contents are not relevant for this transformation). -->
...
...
hdoc_to_opale/xsl/prepareCourseUcCopies.xsl
View file @
78d41803
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
<property
name=
"lib"
location=
"${{basedir}}/lib"
/>
<property
name=
"lib"
location=
"${{basedir}}/lib"
/>
<property
name=
"log"
location=
"${{basedir}}/log"
/>
<property
name=
"log"
location=
"${{basedir}}/log"
/>
<property
name=
"schema"
location=
"${{basedir}}/schema"
/>
<property
name=
"schema"
location=
"${{basedir}}/schema"
/>
<property
name=
"filename"
location=
"{$filename}"
/>
<property
name=
"filename"
location=
"
$
{$filename}"
/>
<taskdef
name=
"jing"
classname=
"com.thaiopensource.relaxng.util.JingTask"
>
<taskdef
name=
"jing"
classname=
"com.thaiopensource.relaxng.util.JingTask"
>
<classpath>
<classpath>
<pathelement
location=
"../${lib}/jing.jar"
/>
<pathelement
location=
"../${lib}/jing.jar"
/>
...
...
hdoc_to_opale/xsl/transformation0.xsl
View file @
78d41803
...
@@ -36,7 +36,7 @@
...
@@ -36,7 +36,7 @@
style=
"${{xsl}}/moveRessourceFiles.xsl"
style=
"${{xsl}}/moveRessourceFiles.xsl"
processor=
"org.apache.tools.ant.taskdefs.optional.TraXLiaison"
processor=
"org.apache.tools.ant.taskdefs.optional.TraXLiaison"
>
>
<param
name=
"filename"
expression=
"${{tmp}}
/
${{filename}}"
/>
<param
name=
"filename"
expression=
"${{tmp}}
\
${{filename}}"
/>
</xslt>
</xslt>
<chmod
file=
"${{tmp}}/${{filename}}/moveRessourceFiles.xml"
perm=
"777"
/>
<chmod
file=
"${{tmp}}/${{filename}}/moveRessourceFiles.xml"
perm=
"777"
/>
<xslt
<xslt
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment