readme.md 2.8 KB
Newer Older
1
2
3
Optim to Opale (`optim_to_opale`)
===============================
Last edit: January 4, 2016
Jean-Baptiste Martin's avatar
Jean-Baptiste Martin committed
4

5
6
7
License
-------
This project is under [GPL 3.0 licence](http://www.gnu.org/licenses/gpl-3.0.txt).
Jean-Baptiste Martin's avatar
Jean-Baptiste Martin committed
8

9
10
11
Credits
-------
### Autumn 2015
Jean-Baptiste Martin's avatar
Jean-Baptiste Martin committed
12

13
* Ivan D'HALLUIN
14
* Jeffrey DECORDE
15
* Jean-Baptiste MARTIN
Jean-Baptiste Martin's avatar
Jean-Baptiste Martin committed
16

17
18
Presentation
------------
19
`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.
Jean-Baptiste Martin's avatar
Jean-Baptiste Martin committed
20

21
22
Dependencies
------------
Jean-Baptiste Martin's avatar
Jean-Baptiste Martin committed
23
24
In order to work properly this script needs

25
26
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)
Jean-Baptiste Martin's avatar
Jean-Baptiste Martin committed
27

28
29
30
User Documentation
------------------
### Running the script
Jean-Baptiste Martin's avatar
Jean-Baptiste Martin committed
31
32

1. Put the file you want to convert into the `input` directory
33
34
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)
Jean-Baptiste Martin's avatar
Jean-Baptiste Martin committed
35
36
4. Enjoy!

37
### How is this script working
Jean-Baptiste Martin's avatar
Jean-Baptiste Martin committed
38
39

1. The script first determines what OS you are using so it then can call the right scripts
40
41
42
43
44
45
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`
Jean-Baptiste Martin's avatar
Jean-Baptiste Martin committed
46

47
During all the process it also prints some basic information both on screen and in the log file.
48
49
50

Unsupported
-----------
51
52
53
54

### 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.
55
56
57
58
59
60
61
62

Known bugs
----------
N/A for now.

Todo
----

63
64
65
66
67
68
69
70
### 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`

71
72
73
74
75
76
Technical notes
---------------

Capitalization
--------------