README.md 4.13 KB
Newer Older
1 2 3
Converter hdoc_to_optim
-----------------------

4
The purpose of this converter is to obtain an Optim document (paper, slideshow, website or webpage) from a HTML file that respects the HDOC schema.
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37


License GPL3.0
--------------

http://www.gnu.org/licenses/gpl-3.0.txt


Credits
-------

* Rihab HACHEM

* Perrine RAVAUD (2014).


Dependance
----------

No dependance needed.


User documentation
------------------

There are two different ways to use the converter hdoc_to_optim: by running a script run.bat/run.sh or by command line using a terminal (allows the user to specify some parameters like the document type).


#### Running the script run.bat/run.sh:

Use this method if you do not want to use a terminal. 

1. Download hdoc_converter.zip and unzip it.
38
2. Add your source file to the Input folder. It has to be a .hdoc file. 
39
3. Place only one file in that folder !!! 
40 41 42 43 44 45 46 47 48
4. If you are using Linux, run the script run.sh. If you are using Windows, run the script run.bat. 
5. Your file has been converted, the result is in the Output folder. 
6. You can now open it with OptimOffice.

The default output document type used by this script is an Optim paper. 


#### Terminal: 

49
By using the terminal you can specify some parameters to the conversion : the source file, or the output type (either a paper, a slideshow, a website or a webpage).
50 51 52 53 54 55 56 57 58

1. Download hdoc_converter.zip and unzip it.
2. Open your terminal and go into the folder hdoc_to_optim.
3. Run the following command:

        "ant -buildfile hdoc_to_optim.ant"
    
    You can specify the source file, and the output document type by adding parameters.
    Use -DInputFile to specify the source file. 
59
    Use -DDocType to specify if it's a "paper", a "slideshow", a "website" or a "webpage".
60 61 62 63
    Exemple:
        
        "ant -buildfile hdoc_to_optim.ant -DDocType slideshow -DInputFile sample.hdoc"

64 65
	"ant -buildfile hdoc_to_optim.ant -DDocType website"

66

67
Both parameters are optional. Your file has been converted, you can open your paper with OptimOffice.
68 69 70 71 72


Unsupported 
-----------

73
#### In paper, slideshow, website and webpage: 
74 75 76 77

* Inline: Superscript, Subscript
* SpanType : Latex, Syntax

78
#### In slideshow, website and webpage:
79 80 81

* Metadata : Description, Keywords

82 83 84 85
#### In webpage:

* All metadata (however, if it's only a webpage, is it really useful ? The metadata should appear on the website information, not each webpage ? )

86 87 88 89 90 91 92 93 94 95

Known bugs
----------

No known bugs now.


Todo
---- 

96 97 98
* Offer the possibility of integrating the sections into a webmedia application.
* Find a better way to transform the metadata (description and keywords) information.
* Factorise the code (put all transformations in one file for example).
99
* Offer the possibility of placing multiple input files.
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122
* Integrate Concept trees.


Technical notes
---------------

The converter contains 5 files:

* hdoc_to_optim.ant : 
When you launch the Converter (whether through the script or a terminal) it's the file hdoc_to_optim.ant that is launched, and executes the following files.

* find_content.xsl : 
This XSLT program runs through the hdoc file container.xml to retrieve the path of the file to convert and creates a ANT script get_content.ant.

* find_ressources.xsl :
This XSLT program runs through the content file of hdoc  to retrieve the path of each audio files, images and objects used in it and creates a ANT script get_ressources.ant.

* transfo.xsl (paper) :
This XSLT program runs through the content file of hdoc and convert each hdoc tag in Optim tags if possible. It converts it to a paper.

* transfo2.xsl (slideshow) :
This XSLT program runs through the content file of hdoc and convert each hdoc tag in Optim tags if possible. It converts it to a slideshow.

123 124 125 126 127 128
* transfo3.xsl (website) :
This XSLT program runs through the content file of hdoc and convert each hdoc tag in Optim tags if possible. It converts it to a website.

* transfo4.xsl (webpage) :
This XSLT program runs through the content file of hdoc and convert each hdoc tag in Optim tags if possible. It converts it to a webpage.

129 130 131 132 133 134 135 136
* .wspmeta :
This file contains Optim metadata informations, it must be placed in the result of the conversion


Capitalisation
--------------

N/A