Commit 119a60f9 authored by aperdria's avatar aperdria

Merge branch 'master' of gitlab.utc.fr:crozatst/hdoc

parents 2281bcf4 50e4eeec
# HDOC CONVERTER PROJECT
# Hdoc Converter Projet
License GPL3.0
http://www.gnu.org/licenses/gpl-3.0.txt
Credits :
Université de Technologie de Compiègne (http://www.utc.fr)
NF29 students (http://www4.utc.fr/~nf29)
## What is Hdoc ?
Please refer to the [Hdoc converter project website](http://hdoc.crzt.fr/www/co/hdocConverter.html)
>The aim of the project is to propose:
>- a generic XML schema based on XHTML5 for documentary purpose (Hdoc format);
>- a set of converters to transform document formats from and to Hdoc;
>- a web site to manage the converters (Hdoc Converter Portal).
Please refer to the Hdoc Converter Project website:
http://hdoc.crzt.fr
## What is this repository ?
This repository gathers some of the Hdoc converters, if not all of them.
Project URL : https://gitlab.utc.fr/crozatst/hdoc.git
## How to use Hdoc Converters ?
This repository gathers some of the Hdoc converters, if not all of them.
\ No newline at end of file
In order to use a converter, choose the corresponding folder and consult README.md for instructions.
# antce
"antce" is not for use, it is just a base for autonomous multi-OS ANT launcher
# Etherpad to Hdoc -- HDOC CONVERTER PROJECT
## [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.
- To do so :
1. please place your html files in the `/input` folder
# Converter etherpad_to_hdoc
## License
License GPL3.0
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
3. and retrieve the hdoc outputs in the `/output` folder
## Unsupported
- Markdown
- Author paternity
- Etherpad timeline
- 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
- Markdown
## 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
### Supported tags
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
# Etherpad To Lexique -- HDOC CONVERTER PROJECT
Comment récupérer un document de type Etherpad et le transformer en document lexique.
*les chemins d'accès indiqués sont relatifs à ce fichier readme*
1. Télécharger un document Etherpad en format HTML
1. Créer ou rejoindre un document etherpad puis l'exporter sous un format html (bouton `Importer/Exporter`)
2. **Enregistrer le document sous le nom `pad.html`** dans le dossier `/input` (si le dossier n'existe pas, le créer)
NB: il ne doit pour le moment n'y avoir qu'un seul fichier nommé de cette façon.
2. Exécuter le fichier `/run.bat` ou `/run.sh` selon l'OS ; un fichier `.scar` est créé dans le dossier `/output`
3. Ouvrir le document produit avec lexique
1. Ouvrir Scenari, ouvrir la liste des entrepôts distants et choisir UTC-etu_lexique.
2. Aller dans le dossier sandBox/etherpad-to-lexique.
3. Réaliser un cliquer glisser avec votre fichier `.scar` dans le dossier ou bien faire un clic droit sur le dossier puis Importer.
4. Ouvrir le fichier Main.xml nouvellement créé.
\ No newline at end of file
# Etherpad2Lexique -- HDOC CONVERTER PROJECT
## License
[GPL 3.0](http://www.gnu.org/licenses/gpl-3.0.txt)
## Credits
- Rit Gabrielle
- Vintache Jean
- Douteau Jean-Côme
- Fecherolle Cécile (2014)
##Presentation
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.
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
- MarkDown
- Timeline and author paternity
- Chat
##Known bugs
Nested lists in lists are not supported
example :
`<ul>
<li>
<ul>
<li>
Never gonna let you down.
</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
# Etherpad To Opale -- HDOC CONVERTER PROJECT
Comment récupérer un document de type Etherpad et le transformer en document opale.
*les chemins d'accès indiqués sont relatifs à ce fichier readme*
1. Télécharger un document Etherpad en format HTML
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)
2. Exécuter le fichier `/run.bat` ou `/run.sh` selon l'OS ; un fichier `.scar` est créé dans le dossier `/output`
*si le dossier `/input` contient plusieurs fichiers html, ils sont tous traités*
3. Ouvrir le document produit avec opale
1. Ouvrir Scenari, ouvrir la liste des entrepôts distants et choisir UTC-etu_opale.
2. Aller dans le dossier sandBox/etherpad-to-opale.
3. Réaliser un cliquer glisser avec votre fichier `.scar` dans le dossier ou bien faire un clic droit sur le dossier puis Importer.
4. Ouvrir le fichier Main.xml nouvellement créé.
# Etherpad2Opale -- HDOC CONVERTER PROJECT
## License
[GPL 3.0](http://www.gnu.org/licenses/gpl-3.0.txt)
## Credits
- Rit Gabrielle
- Vintache Jean
- Douteau Jean-Côme
- Fecherolle Cécile (2014)
##Presentation
How to transform an etherpad document in opale document.
Filepath in this document are relative to this file readme.
## 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).
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
# Etherpad To Optim -- HDOC CONVERTER PROJECT
Comment récupérer un document de type Etherpad et le transformer en document optim.
*les chemins d'accès indiqués sont relatifs à ce fichier readme*
1. Télécharger un document Etherpad en format HTML
1. Créer ou rejoindre un document etherpad puis l'exporter sous un format html (bouton `Importer/Exporter`)
2. **Enregistrer le document sous le nom `pad.html`** dans le dossier `/input` (si le dossier n'existe pas, le créer)
NB: il ne doit pour le moment n'y avoir qu'un seul fichier nommé de cette façon.
2. Exécuter le fichier `/run.bat` ou `/run.sh` selon l'OS ; un fichier `.scar` est créé dans le dossier `/output`
3. Ouvrir le document produit avec optim
1. Ouvrir Scenari, ouvrir la liste des entrepôts distants et choisir UTC-etu_optim.
2. Aller dans le dossier sandBox/etherpad-to-optim.
3. Réaliser un cliquer glisser avec votre fichier `.scar` dans le dossier ou bien faire un clic droit sur le dossier puis Importer.
4. Ouvrir le fichier Main.xml nouvellement créé.
# Etherpad2Optim -- HDOC CONVERTER PROJECT
## License
[GPL 3.0](http://www.gnu.org/licenses/gpl-3.0.txt)
## Credits
- Rit Gabrielle
- Vintache Jean
- Douteau Jean-Côme
- Fecherolle Cécile (2014)
##Presentation
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.
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
- MarkDown
- Timeline and author paternity
- Chat
##Known bugs
Nested lists in lists are not supported
example :
`<ul>
<li>
<ul>
<li>
Never gonna let you down.
</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
......@@ -5,14 +5,14 @@
>
<xsl:output method="xml" indent="yes" encoding="UTF-8"/>
<xsl:param name="filename"/>
<!-- This template matches the root and create a ANT project, the root of any ANT buildfile. -->
<xsl:template match="h:html">
<project name="moveRessourceFiles" basedir="." default="moveRessourceFiles">
<property file="global.properties"/>
<property name="filename" location="{$filename}"/>
<property name="filename2" location="{$filename}"/>
<target name="moveRessourceFiles">
<xsl:apply-templates select="./*"/>
</target>
......@@ -32,16 +32,16 @@
<!-- Targeted markups. -->
<xsl:template match="h:img">
<copy tofile="${{filename}}/decompressedOpale/res/{./@src}" file="${{filename}}/decompressedHdoc/{./@src}"/>
<copy tofile="${{filename2}}/decompressedOpale/res/{./@src}" file="${{filename2}}/decompressedHdoc/{./@src}"/>
</xsl:template>
<xsl:template match="h:audio">
<copy tofile="${{filename}}/decompressedOpale/res/{./@src}" file="${{filename}}/decompressedHdoc/{./@src}"/>
<copy tofile="${{filename2}}/decompressedOpale/res/{./@src}" file="${{filename2}}/decompressedHdoc/{./@src}"/>
</xsl:template>
<xsl:template match="h:video">
<copy tofile="${{filename}}/decompressedOpale/res/{./@src}" file="${{filename}}/decompressedHdoc/{./@src}"/>
<copy tofile="${{filename2}}/decompressedOpale/res/{./@src}" file="${{filename2}}/decompressedHdoc/{./@src}"/>
</xsl:template>
<xsl:template match="h:object">
<copy tofile="${{filename}}/decompressedOpale/res/{./@data}" file="${{filename}}/decompressedHdoc/{./@data}"/>
<copy tofile="${{filename2}}/decompressedOpale/res/{./@data}" file="${{filename2}}/decompressedHdoc/{./@data}"/>
</xsl:template>
<!-- These markups are matched in order to minimize "apply-templates" side-effects (i.e. their contents are not relevant for this transformation). -->
......
......@@ -18,7 +18,7 @@
<property name="lib" location="${{basedir}}/lib"/>
<property name="log" location="${{basedir}}/log"/>
<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">
<classpath>
<pathelement location="../${lib}/jing.jar"/>
......
......@@ -36,7 +36,7 @@
style="${{xsl}}/moveRessourceFiles.xsl"
processor="org.apache.tools.ant.taskdefs.optional.TraXLiaison"
>
<param name="filename" expression="${{tmp}}/${{filename}}"/>
<param name="filename" expression="${{tmp}}\${{filename}}"/>
</xslt>
<chmod file="${{tmp}}/${{filename}}/moveRessourceFiles.xml" perm="777"/>
<xslt
......
......@@ -55,7 +55,7 @@
</target>
<target name="buildOutput" depends="unzipSource">
<xslt classpath="${libdir}/saxon9he.jar" style="${xsldir}/termToRef.xsl" basedir="${srcdir}" destdir="${OutputPath}" followsymlinks="false" extension=".ref">
<xslt classpath="${libdir}/saxon9he.jar" style="${xsldir}/termToRdf.xsl" basedir="${srcdir}" destdir="${OutputPath}" followsymlinks="false" extension=".rdf">
<include name="**/*.term"/>
</xslt>
<copy file="opale.wspmeta" tofile="${OutputPath}/.wspmeta"></copy>
......@@ -71,4 +71,4 @@
<delete dir="${outdir}" />
</target>
</project>
\ No newline at end of file
</project>
......@@ -4,11 +4,9 @@
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:ont="nf29ont"
xmlns:sp="http://www.utc.fr/ics/scenari/v3/primitive"
xmlns:sc="http://www.utc.fr/ics/scenari/v3/core"
xmlns:lx="scpf.org:lexicon"
xmlns:op="utc.fr:ics/opale3"
exclude-result-prefixes="xs"
exclude-result-prefixes="xs sp sc lx"
version="2.0">
<xsl:output method="xml" indent="yes" />
......
This diff is collapsed.
Mindmapping to HDOC
===================
Converter Mindmapping2HDOC
==========================
Conversion of Freemind file(s) (.mm) to Hdoc
# How to use the converter
Licence
-------
GPL3.0
Credits
-------
* Amélie Perdriaud
* Thibault Brocheton
* Bastien Frémondière
* Guillaume Gomez
Presentation
------------
This project aims at converting mindmapping files to hdoc files.
User documentation
------------------
Use a terminal and go to the root of the folder (mindmapping_to_hdoc).
#1 : You want to convert SEVERAL Freemind files in Hdoc
......@@ -21,3 +37,38 @@ Use a terminal and go to the root of the folder (mindmapping_to_hdoc).
You will find the result in the folder mindmapping_to_hdoc/result
Unsupported
-----------
* Convert color
* Convert icon into summary elements.
* headers (especially keywords) are partially supported.
Known bugs
----------
* All hdoc samples given in the "Download" section have been tested and should work well. If you want to use your own hdoc files, make sure that container.xml's root contains version="1.0" and xmlns="urn:utc.fr:ics:hdoc:container" attributes. Otherwise ant building will fail.
* It is not specified in hdoc's standard but I assume that hdoc's content file (usually named "content.xml") fullpath is a relative path that begins at the root of the hdoc archive. That means that the full-path attribute of <rootfile> (in container.xml) begins with a character, and not a special sequence such as ".", ".." or "/". It is already the case for my samples, but if you want to use your own samples make sure this full-path attribute is ok.
Todo
----
* Get mindmap from Framamind
* Mindmap to lexique conversion
* Mindmap to optim conversion
Technical notes
---------------
This converter is using standard NF29 conversion project structure : I use a main ANT file (named mapMapping2Hdoc.ant), which handles routine tasks (zipping archives, copying files, order tasks), XSL-XSLT transformation scripts calls. This main ANT file is composed of several targets.
During the conversion process, I use a few temporary files stored in a temp folder : their content depends on hdoc's files (such as "container.xml", "content.xml" and ressource files). See details below.
You can comment the part of code where temp directory is deleted in order to view raw files directly instead of unzipping hdoc file.
What is META-INF folder ?
This is a simple folder with a xml file named 'content.xml' that contains useful information for Opale. Every .scar archives must contain this file, what it exactly does is not the purpose of this project.
Freemind / HDOC
-- INSERT doc_language.md --
Capitalisation
--------------
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Usage
-----
Optim to Hdoc
=============
Put `.scar` files in the input folder, run `run.bat` or `run.sh` and get results in output folder (one folder and a .hdoc per .scar).
Licence
-------
License GPL3.0
http://www.gnu.org/licenses/gpl-3.0.txt
Todo list
---------
- tests more files
- clean output of optim source files
- resolve bugs
- test the entier process from optim to opale
- the level of unit of content for the Opal conversion if basically set to sections witch doesn't contains any section but some could need it to be set to another level. Create a selection of this level could be a next step for this project.
Credits
-------
Bugs
----
Ivan D'halluin, Sylvain Lagache, Frédéric Le Feurmou.
User documentation
------------------
Use the project as describe in the root README. You can convert multiple files by putting all `.scar` in the input folder.
You can convert paper, section, website, slideshow and webpage.
Known bugs
----------
- references of sections or fragments inside a paragraphe
- can create divs with only h6
Transformation
--------------
Todo
----
- tests more files
- clean output of optim source files
- resolve bugs
- the level of unit of content for the Opal conversion if basically set to sections witch doesn't contains any section but some could need it to be set to another level. Create a selection of this level could be a next step for this project.
Technicals notes
----------------
| Optim start tag (or structures) | HDOC end tag | Note |
|---------------------------------|-------------------------------------|---------------------------------------------|
......@@ -79,4 +96,5 @@ Transformation
| tree | <div><h6/><p/></div> | The structure of trees cannot be converted |
| | | and the result is a list a blocks |
|---------------------------------|-------------------------------------|---------------------------------------------|
| title | <h6> | |
\ No newline at end of file
| title | <h6> | |
......@@ -198,6 +198,11 @@
<mkdir dir="${tmp}"/>
<delete dir="${out}" failonerror="false"/>
<mkdir dir="${out}"/>
<delete dir="${optim_to_hdoc_in}" failonerror="false"/>
<mkdir dir="${optim_to_hdoc_in}"/>
<delete dir="${hdoc_to_opale_in}" failonerror="false"/>
<mkdir dir="${hdoc_to_opale_in}"/>
</target>
</project>
\ No newline at end of file
Optim to Opale (optim_to_opale)
-------------------------------
Optim to Opale (`optim_to_opale`)
===============================
Last edit: January 4, 2016
Last edit: December 17, 2015
License
-------
This project is under [GPL 3.0 licence](http://www.gnu.org/licenses/gpl-3.0.txt).
# Purpose
Credits
-------
### Autumn 2015
`optim_to_opale` is an ANT script to convert a file from Optim format to Opale format.
* Ivan D'HALLUIN
* Jeffrey DECORDE
* Jean-Baptiste MARTIN
# Dependencies
Presentation
------------
`optim_to_opale` is an ANT script that converts a file from Optim format to Opale format. It simply calls `optim_to_hdoc` and `hdoc_to_opale` scripts.
Dependencies
------------
In order to work properly this script needs
1. `optim_to_hdoc` (Optim to HDoc conversion)
2. `hdoc_to_opale` (HDoc to Opale conversion)
1. [`optim_to_hdoc`](https://gitlab.utc.fr/crozatst/hdoc/tree/master/optim_to_hdoc) (Optim to HDoc conversion)
2. [`hdoc_to_opale`](https://gitlab.utc.fr/crozatst/hdoc/tree/master/hdoc_to_opale) (HDoc to Opale conversion)
# Running the script
User Documentation
------------------
### Running the script
1. Put the file you want to convert into the `input` directory
2. Run the `run.sh`file on a Unix system (Linux, Mac OS, etc.) or the `run.bat`on Windows
3. Your converted file is placed into the `output` directory (a log file is also placed into the `log`directory)
2. Run the `run.sh` file on a Unix system (Linux, Mac OS, etc.) or the `run.bat` on Windows
3. Your converted file is placed into the `output` directory (a log file is also placed into the `log` directory)
4. Enjoy!
# How is this script working
### How is this script working
1. The script first determines what OS you are using so it then can call the right scripts
2. It cleans the `log`, `tmp`and `output`directories
3. It copies the files that are inside the `input`directory to the `input` directory of `optim_to_hdoc`
4. It calls `optim_to_hdoc`run script (`.bat` on windows, `.sh`on Unix)
5. It copies the files that are inside the `output`directory of `optim_to_hdoc` to the `input` directory of `hdoc_to_opale`
6. It calls `hdoc_to_opale`run script (`.bat` on windows, `.sh`on Unix)
7. It copies the files that are inside the `output`directory of `hdoc_to_opale` to the `output` directory of `optim_to_opale`
2. It cleans the `log`, `tmp` and `output` directories
3. It copies the files that are inside the `input` directory to the `input` directory of `optim_to_hdoc`
4. It calls `optim_to_hdoc` run script (`.bat` on windows, `.sh` on Unix)
5. It copies the files that are inside the `output` directory of `optim_to_hdoc` to the `input` directory of `hdoc_to_opale`
6. It calls `hdoc_to_opale` run script (`.bat` on windows, `.sh` on Unix)
7. It copies the files that are inside the `output` directory of `hdoc_to_opale` to the `output` directory of `optim_to_opale`
During all the process it also prints some basic information both on screen and in the log file.
Unsupported
-----------
### Single file conversion with parameter
The script currently doesn't support any paramater to specify the file to convert. If multiple files are in the `input` directory, the script will convert all these files.
Known bugs
----------
N/A for now.
Todo
----
### Single file conversion with parameter
This feature requires that the same feature has been implementing in `optim_to_hdoc` and `hdoc_to_opale` first.
1. Add a parameter to the `ant` script and to both the `.bat` and `.sh` scripts to accept a filename (refering to a file placed into the `input` directory) to convert only one file
2. Don't clean `optim_to_hdoc` and `hdoc_to_opale` `input` directories: simply remove the lines in the `clean` target
3. Call `optim_to_hdoc` and `hdoc_to_opale` scripts by passing a parameter with the filename (this feature first needs to be implementing in `optim_to_hdoc` and `hdoc_to_opale`
Technical notes
---------------
Capitalization
--------------
Converter : Wikipedia_to_Hdoc
---------------
===============
Licence : GPL 3.0
Licence :
---------------
GPL 3.0
http://www.gnu.org/licenses/gpl-3.0.txt
Credits :
---------------
......@@ -12,9 +15,13 @@ Harriga Merouane
Lhomme Nicolas
Previous developers
Presentation
---------------
This converter transforms a wkipedia page (from a link or a saved page) to a Hdoc document.
Getting started
User Documentation
---------------
Use a terminal and go to the root of the folder (Wikipedia_to_hdoc).
......@@ -88,4 +95,11 @@ Be aware of the following things
BUG
---
1 - Linux sh files doesn't work with UTC proxy but works outside UTC
\ No newline at end of file
1 - Linux sh files doesn't work with UTC proxy but works outside of UTC.
2 - Random errors might occur
Wikipedia is a great tool : everyone can participe. However, it does not provide contributors with best practices that everyone follows. The result is a lot of different ways to write articles. This is why this converter might not handle some situations (even if all files I have tried worked), and it might not be able to output some Wikipedia articles at its current state.
3 - Small issues with Opale
Links can be invisible if you use an old version of Opale. This is not a problem coming from the Wikipedia to Hdoc converter. Make sure you use an updated version of Opale to test your scar archives.
Another thing is that Opale might indicate that the scar file contains errors once imported. Actually, these "errors" are warnings. The archives work, as they were validated when making the scar file. These warnings come from Opale, but you can ignore them.
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"