~layette/layette/trunk

« back to all changes in this revision

Viewing changes to docs/file_format.rst

  • Committer: Samuel Dolt
  • Date: 2014-04-16 13:23:25 UTC
  • Revision ID: samuel@dolt.ch-20140416132325-hwhono03j6j4z9fx
Rewrite in the Unix way

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
****************************
 
2
Layette standard file format
 
3
****************************
 
4
 
 
5
Layette store data in the Unix way: in flat text file.
 
6
 
 
7
We use a simple format, derivated of config file for storing field.
 
8
 
 
9
Each line with data represent a field or a groupe.
 
10
Each fields have a type, name and data. In addition, they must belong to a group. 
 
11
 
 
12
.. note::
 
13
    Type and name are only alphabetics character, minus (-) or
 
14
    underline (_) and they are case sensitive. 
 
15
 
 
16
.. note::
 
17
    All char after # is a comment. For use # for other purpose, use
 
18
    \# instead.
 
19
    
 
20
.. note::
 
21
    For new line in data, use \n instead of EOL.
 
22
 
 
23
.. code-block:: cpp
 
24
 
 
25
    # a comment
 
26
    
 
27
    [group] 
 
28
    <type> name = data # a comment
 
29
    <this_is> a-VALID = field
 
30
    <this_is> a-mulitline_field = line1\nline2
 
31
    
 
32
    # empty line is ok
 
33
    
 
34
    
 
35
    [another-groupe]
 
36
    <antoher> VALID = field
 
37
    <a> long_data_field = Hello world!
 
38
    <antoher> VALID = field\#not_a_comment
 
39
    
 
40