Commit d539109b authored by edepuiff's avatar edepuiff

README final version

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

Conflicts:
	lexique_to_hdoc/README.md
	lexique_to_hdoc/README.md~
parents 65626047 de68c417
......@@ -3,22 +3,23 @@
License GPL3.0
http://www.gnu.org/licenses/gpl-3.0.txt
##Crédits
## Crédits
Antoine Aufrechter, Estelle de Magondeaux, Marouane Hammi
##Install
## Install
In order to use this converter, follow those steps :
1. Copy your hdoc file (.scar or .zip) into the input directory. Do not put more than one file into the input directory.
2. Execute the run that correspond to your OS.
3. You will find the result into the output directory.
##User documentation
## User documentation
For each definition in the content.xml a .term is generated and for each source that is referenced in a definition the image associated (with its meta and props files) is copied into the output file with the definition.
##Known bugs
## Known bugs
>- Cannot put multiple input files
##TODO
>- Change the name of the file (.term) to the definition associated
## TODO
>- Change the name of the file (.term) to have a name without special character
>- Manage multiple input files (e.g. see lexique_to_opale)
>- list of element to convert :
>>- src url
......@@ -27,8 +28,8 @@ In order to use this converter, follow those steps :
>>- type (female, male,...) and (abbreviation, expanded,...)
>>- array
>>- multimedia
>-Do not generate the content.term or use it to generate an index instead (currently content.term is generated but useless)
##Technical notes
## Technical notes
>- The converter have to respect the same schema as the lexique_to_hdoc converter for the xslt
##Capitalisation
......@@ -22,10 +22,19 @@
<xsl:template match="h:section">
<xsl:apply-templates select="h:div"/>
<xsl:apply-templates select="h:section"/>
<xsl:apply-templates select="h:p"/>
</xsl:template>
<xsl:template match="h:div">
<xsl:apply-templates select="h:section"/>
<xsl:apply-templates select="h:p"/>
<xsl:apply-templates select="h:img"/>
<xsl:apply-templates select="h:object"/>
<xsl:apply-templates select="h:audio"/>
</xsl:template>
<xsl:template match="h:p">
<xsl:apply-templates select="h:p"/>
<xsl:apply-templates select="h:img"/>
<xsl:apply-templates select="h:object"/>
<xsl:apply-templates select="h:audio"/>
......@@ -33,17 +42,19 @@
<xsl:template match="h:img">
<xsl:variable name="src" select="@src"/>
<copy file="${srcdir}/${nameInputsId}/{$src}" tofile="${outdir}/{$src}"/>
<copy file="${{srcdir}}/${{nameInputsId}}/{$src}" tofile="${{outdir}}/{$src}"/>
<copy file="${{srcdir}}/${{nameInputsId}}/{$src}/../meta.xml" tofile="${{outdir}}/{$src}/../meta.xml"/>
<copy file="${{srcdir}}/${{nameInputsId}}/{$src}/../props.xml" tofile="${{outdir}}/{$src}/../props.xml"/>
</xsl:template>
<xsl:template match="h:object">
<xsl:variable name="data" select="@data"/>
<copy file="${srcdir}/${nameInputsId}/{$data}" tofile="${outdir}/{$data}"/>
<copy file="${{srcdir}}/${{nameInputsId}}/{$data}" tofile="${{outdir}}/{$data}"/>
</xsl:template>
<xsl:template match="h:audio">
<xsl:variable name="src" select="@src"/>
<copy file="${srcdir}/${nameInputsId}/{$src}" tofile="${outdir}/{$src}"/>
<copy file="${{srcdir}}/${{nameInputsId}}/{$src}" tofile="${{outdir}}/{$src}"/>
</xsl:template>
</xsl:stylesheet>
......
......@@ -10,54 +10,42 @@
<xsl:output method="xml" indent="yes" />
<xsl:template match="/">
<sc:item xmlns:sc="http://www.utc.fr/ics/scenari/v3/core">
<lx:term xmlns:sp="http://www.utc.fr/ics/scenari/v3/primitive" xmlns:lx="scpf.org:lexicon">
<lx:termM>
<sp:name><xsl:value-of select="hodoc:html/hodoc:body/hodoc:h2[@span='titre_def']"></xsl:value-of></sp:name>
</lx:termM>
<sp:def>
<lx:definition>
<sp:desc>
<lx:defTxt>
<xsl:apply-templates select="hodoc:html/hodoc:body/hodoc:p[@span='def_content']"></xsl:apply-templates>
</lx:defTxt>
</sp:desc>
</lx:definition>
</sp:def>
</lx:term>
</sc:item>
<xsl:apply-templates select="./hodoc:html/hodoc:body"/>
</xsl:template>
<xsl:template match="hodoc:p[@span='def_content']" >
<xsl:value-of select="."/>
<xsl:template match="hodoc:section">
<xsl:result-document href="{hodoc:header/hodoc:h1}.term" encoding="UTF-8"> <!--TODO change name of the file-->
<sc:item xmlns:sc="http://www.utc.fr/ics/scenari/v3/core"
xmlns:sp="http://www.utc.fr/ics/scenari/v3/primitive" xmlns:lx="scpf.org:lexicon"
xmlns:file="java.io.File">
<lx:term >
<lx:termM>
<sp:name><xsl:value-of select="hodoc:header/hodoc:h1"></xsl:value-of></sp:name>
</lx:termM>
<sp:def>
<lx:definition>
<sp:desc>
<lx:defTxt>
<sc:para xml:space="preserve" sc:id="t7"><xsl:apply-templates select="hodoc:div/hodoc:p[@span='def_content']/hodoc:p[@class='def_text']"></xsl:apply-templates></sc:para>
</lx:defTxt>
</sp:desc>
</lx:definition>
</sp:def>
</lx:term>
</sc:item>
</xsl:result-document>
</xsl:template>
<xsl:template match="hodoc:p[@class='def_text']" >
<xsl:value-of select="./text()"/>
<!--
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
</xsl:copy>-->
</xsl:template>
<!-- <xsl:template match="/hodoc:html/hodoc:body">
<xsl:for-each select="/hodoc:html/hodoc:body/hodoc:section">
<xsl:result-document href="section{position()}.html"> TODO change name of the file
<sc:item xmlns:sc="http://www.utc.fr/ics/scenari/v3/core">
<lx:term xmlns:sp="http://www.utc.fr/ics/scenari/v3/primitive" xmlns:lx="scpf.org:lexicon">
<lx:termM>
<sp:name><xsl:value-of select="hodoc:h2[@span='titre_def']"></xsl:value-of></sp:name>
</lx:termM>
<sp:def>
<lx:definition>
<sp:desc>
<lx:defTxt>
<xsl:apply-templates select="hodoc:p[@span='def_content']"></xsl:apply-templates>
</lx:defTxt>
</sp:desc>
</lx:definition>
</sp:def>
</lx:term>
</sc:item>
</xsl:result-document>
</xsl:for-each>
</xsl:template>-->
</xsl:stylesheet>
README.md
# Converter lexique_to_hdoc
License GPL.3.0
#License GPL.3.0
http://www.gnu.org/licenses/gpl-3.0.txt
#Crédits
......@@ -11,21 +11,22 @@ Marouane Hammi
#Install
In order to use this converter, follow those steps :
1. Create a dictionnary "dictionnaire.xml" which referenciate every definition you want to put ini your hdoc. This dictionnary must respect the "dictionnaire.rng" schema
2. Copy the referenciated definitions in the same current path as the dictionnary (input)
3. Your input folder must contains the dictionnary (dictionnaire.xml) and the lexique definition (**.term).
4. Execute the run that correspond to your OS. (run.sh for linux, run.bat for ubuntu)
1. Create a dictionnary "dictionnaire.xml" which referenciate every definition you want to put in your hdoc. This dictionnary must respect the "dictionnaire.rng" schema
2. Copy the referenciated definitions in the same folder than the dictionnary (input)
3. Your input folder must contain the dictionnary (dictionnaire.xml) and the lexique definitions (**.term).
4. Execute the run that corresponds to your OS. (run.sh for Linux, run.bat for Windows)
5. You will find the result into the output directory: it is named "content.xml".
#Dependances
none.
#User documentation
You will find a "help" directory taht contains:
- A saple of dictionnary that you neef to write and call "dictionnaire.xml".
User documentation
You will find a "help" directory that contains:
- A sample of dictionnary that you need to write and call "dictionnaire.xml".
- the lexique definition that you can choose to put into your hdoc (help/available_definition folder).
The generated folder is a .xml . If you desire to see the output in you browser, you need to rename it as a .html.
If you want to create more definitions with images and tables, you will need to put this ressources in the folder naed "&". It contains all the ressources which are copy-pasted in the output folder so they can de seen in the hdoc.
If you want to create more definitions with images and tables, you will need to put this ressources in the folder named "&". It contains all the ressources which are copy-pasted in the output folder so they can e seen in the hdoc.
#Unsupported
Audio and video transformation
......@@ -34,10 +35,11 @@ Audio and video transformation
none
#TODO
create a better transformation for the ressources. At the moment the user needs to copy the ressources in a folder named "&". The best would be tomatch the ressources in every definitions, and to call an aNT which automatically copy the ressources needed in this folder.
create a better transformation for the ressources. At the moment the user needs to copy the ressources in a folder named "&". The best would be to match the ressources in every definitions, and to call an Ant which automatically copy the ressources needed in this folder.
Create a transformation which allows every audio resources to be seen in the hdoc.
create the Ant transformation which copies the sources folder so that the source link is not empty.
#Technical notes
If folders names are changed, you will need to change the tasks of the ANT file.
If folders' names are changed, you will need to change the tasks of the ANT file.
#Capitalisation
README.md
# Converter lexique_to_hdoc
License GPL.3.0
#License GPL.3.0
http://www.gnu.org/licenses/gpl-3.0.txt
#Crédits
......@@ -11,21 +11,22 @@ Marouane Hammi
#Install
In order to use this converter, follow those steps :
1. Create a dictionnary "dictionnaire.xml" which referenciate every definition you want to put ini your hdoc. This dictionnary must respect the "dictionnaire.rng" schema
2. Copy the referenciated definitions in the same current path as the dictionnary (input)
3. Your input folder must contains the dictionnary (dictionnaire.xml) and the lexique definition (**.term).
4. Execute the run that correspond to your OS. (run.sh for linux, run.bat for ubuntu)
1. Create a dictionnary "dictionnaire.xml" which referenciate every definition you want to put in your hdoc. This dictionnary must respect the "dictionnaire.rng" schema
2. Copy the referenciated definitions in the same folder than the dictionnary (input)
3. Your input folder must contain the dictionnary (dictionnaire.xml) and the lexique definitions (**.term).
4. Execute the run that corresponds to your OS. (run.sh for Linux, run.bat for Windows)
5. You will find the result into the output directory: it is named "content.xml".
#Dependances
none.
#User documentation
You will find a "help" directory taht contains:
- A saple of dictionnary that you neef to write and call "dictionnaire.xml".
User documentation
You will find a "help" directory that contains:
- A sample of dictionnary that you need to write and call "dictionnaire.xml".
- the lexique definition that you can choose to put into your hdoc (help/available_definition folder).
The generated folder is a .xml . If you desire to see the output in you browser, you need to rename it as a .html.
If you want to create more definitions with images and tables, you will need to put this ressources in the folder naed "&". It contains all the ressources which are copy-pasted in the output folder so they can de seen in the hdoc.
If you want to create more definitions with images and tables, you will need to put this ressources in the folder named "&". It contains all the ressources which are copy-pasted in the output folder so they can e seen in the hdoc.
#Unsupported
Audio and video transformation
......@@ -34,10 +35,11 @@ Audio and video transformation
none
#TODO
create a better transformation for the ressources. At the moment the user needs to copy the ressources in a folder named "&". The best would be tomatch the ressources in every definitions, and to call an aNT which automatically copy the ressources needed in this folder.
create a better transformation for the ressources. At the moment the user needs to copy the ressources in a folder named "&". The best would be to match the ressources in every definitions, and to call an Ant which automatically copy the ressources needed in this folder.
Create a transformation which allows every audio resources to be seen in the hdoc.
create the Ant transformation which copies the sources folder so that the source link is not empty.
#Technical notes
If folders names are changed, you will need to change the tasks of the ANT file.
If folders' names are changed, you will need to change the tasks of the ANT file.
#Capitalisation
@echo off
set lib=lib
<<<<<<< HEAD
set ant=lexique_to_hdoc.ant
=======
set ant=lexique_to_opale.ant
>>>>>>> e6164602e4169b2cb7eaf6215434ae0ed8be47a3
set antparam=-Dprogram.param=%1
set scJarList=%lib%\*
......
......@@ -15,7 +15,7 @@ Install
In order to use this converter, follow those steps :
1. Copy your Lexique file(s) (.scar or .zip) into the input directory.
2. Execute the run that correspond to your OS.
3. You will find the result into the output directory. The name of the output files depends of the hour it was processed.
3. You will find the result into the output directory. The name of the output files depends on the hour it was processed.
Dependance
......
......@@ -14,7 +14,7 @@ Install
In order to use this converter, follow those steps :
1. Copy your Lexique file(s) (.scar or .zip) into the input directory.
2. Execute the run that correspond to your OS.
3. You will find the result into the output directory. The name of the output files depends of the hour it was processed.
3. You will find the result into the output directory. The name of the output files depends on the hour it was processed.
Dependance
......
......@@ -12,7 +12,7 @@ Install
In order to use this converter, follow those steps :
1. Copy your Lexique file(s) (.scar or .zip) into the input directory.
2. Execute the run that correspond to your OS.
3. You will find the result into the output directory. The name of the output files depends of the hour it was processed.
3. You will find the result into the output directory. The name of the output files depends on the hour it was processed.
Dependance
......
......@@ -10,7 +10,7 @@ Florian Arend, Antoine Aufrechter, Estelle de Magondeaux, Marouane Hammi
In order to use this converter, follow those steps :
1. Copy your Opale file(s) (.scar or .zip) into the input directory.
2. Execute the run that correspond to your OS.
3. You will find the result into the output directory.The name of the output files depends of the hour it was processed.
3. You will find the result into the output directory.The name of the output files depends on the hour it was processed.
##User documentation
Because the Opale definitions are much less structured that Lexique definitions, only the text content of the definition will be fill out in the Lexique definition. Be free to add other information or organize differently the resulting text.
......
......@@ -14,7 +14,7 @@ Install
In order to use this converter, follow those steps :
1. Copy your Optim file(s) (.scar or .zip) into the input directory.
2. Execute the run that correspond to your OS.
3. You will find the result into the output directory. The name of the output files depends of the hour it was processed.
3. You will find the result into the output directory. The name of the output files depends on the hour it was processed.
Dependance
......
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