README.MD 7.86 KB
Newer Older
1 2
Optim to Hdoc
=============
3

4 5
Licence
-------
6

Ivan D'halluin's avatar
Ivan D'halluin committed
7
This project is under [GPL 3.0](http://www.gnu.org/licenses/gpl-3.0.txt).
8 9


10 11
Credits
-------
12

13 14 15 16 17 18 19
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.
Ivan D'halluin's avatar
Ivan D'halluin committed
20
You can convert paper, section, website, slideshow and webpage.
21 22 23 24


Known bugs
----------
25

26 27
- references of sections or fragments inside a paragraphe
- can create divs with only h6
28 29


30 31 32 33 34 35
Todo
----

- tests more files
- clean output of optim source files
- resolve bugs
36
- qualify supported version of Optim
Ivan D'halluin's avatar
Ivan D'halluin committed
37 38 39 40 41
- 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
  - maybe define it from the opale root file (paper, section, website, slideshow and webpage)
  - and/or define it from the command line
  - and/or choose it terms of heuristic (size of content, number of imbricated parts...)
  - and/or generate different hdoc version
42 43 44 45


Technicals notes
----------------
46

Ivan D'halluin's avatar
Ivan D'halluin committed
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102
| Optim start tag (or structures) | HDOC end tag                        | Note                                        |
|---------------------------------|-------------------------------------|---------------------------------------------|
| section                         | <section>                           | A section can contains other sections       |
|                                 |                                     | (after the header tag) or several blocks.   |
|                                 | <h1> (title)                        |                                             |
|                                 | <div> (meta)                        |                                             |
|                                 | </header>                           |                                             |
|                                 | ...                                 |                                             |
|                                 | </section>                          |                                             |
|---------------------------------|-------------------------------------|---------------------------------------------|
| block                           | <div>                               | A block can contains several paragraphes.   |
|                                 | <h6/> (title)                       |                                             |
|                                 | <p/> (content)                      |                                             |
|                                 | </div>                              |                                             |
|---------------------------------|-------------------------------------|---------------------------------------------|
| extra (block)                   | <div data-hdoc-type=\"complement\"> |                                             |
|                                 | <h6/> (title)                       |                                             |
|                                 | <p/> (content)                      |                                             |
|                                 | </div>                              |                                             |
|---------------------------------|-------------------------------------|---------------------------------------------|
| emphasis (block)                | <div data-hdoc-type=\"emphasis\">   |                                             |
|                                 | <h6/> (title)                       |                                             |
|                                 | <p/> (content)                      |                                             |
|                                 | </div>                              |                                             |
|---------------------------------|-------------------------------------|---------------------------------------------|
| para                            | <p/>                                |                                             |
|---------------------------------|-------------------------------------|---------------------------------------------|
| emphasis                        | <em/>                               |                                             |
|---------------------------------|-------------------------------------|---------------------------------------------|
| special                         | <em/>                               |                                             |
|---------------------------------|-------------------------------------|---------------------------------------------|
| url                             | <a/>                                |                                             |
|---------------------------------|-------------------------------------|---------------------------------------------|
| quote                           | <q/>                                |                                             |
|---------------------------------|-------------------------------------|---------------------------------------------|
| image                           | <img/>                              |                                             |
|---------------------------------|-------------------------------------|---------------------------------------------|
| audio                           | <audio/>                            |                                             |
|---------------------------------|-------------------------------------|---------------------------------------------|
| odg                             | <object/>                           |                                             |
|---------------------------------|-------------------------------------|---------------------------------------------|
| ods                             | <object/>                           |                                             |
|---------------------------------|-------------------------------------|---------------------------------------------|
| itemizedList                    | <ul><li/>...</ul>                   |                                             |
|---------------------------------|-------------------------------------|---------------------------------------------|
| orderedList                     | <ol><li/>...</ol>                   |                                             |
|---------------------------------|-------------------------------------|---------------------------------------------|
| table                           | <tr><td/>...</tr>                   |                                             |
|---------------------------------|-------------------------------------|---------------------------------------------|
| def                             | <p><em>term</em>Â : definition </p> |                                             |
|---------------------------------|-------------------------------------|---------------------------------------------|
| event                           | <div><h6/><p/></div>                |                                             |
|---------------------------------|-------------------------------------|---------------------------------------------|
| tree                            | <div><h6/><p/></div>                | The structure of trees cannot be converted  |
|                                 |                                     | and the result is a list a blocks           |
|---------------------------------|-------------------------------------|---------------------------------------------|
103 104
| title                           | <h6>                                |                                             |