]> SALOME platform Git repositories - tools/sat.git/blob - doc/src/configuration.rst
Salome HOME
sat #8544 : amélioration et mise à jour de la documentation utilisateur
[tools/sat.git] / doc / src / configuration.rst
1 *************
2 Configuration
3 *************
4
5 *salomeTools* uses files with **.pyconf** extension to store its configuration parameters.
6 These pyconf configuration files are provided by the salomeTool projects that are set by sat init command.
7
8 When executing a command, sat will load several configuration files in a specific order.
9 When all the files are loaded a *config* object is created.
10 Then, this object is passed to all command scripts.
11
12
13 Syntax
14 ======
15 The configuration files use a python-like structure format 
16 (see `config module <http://www.red-dove.com/config-doc/>`_ for a complete description).
17
18 * **{}** define a dictionary,
19 * **[]** define a list,
20 * **@** can be used to include a file,
21 * **$prefix** reference to another parameter (ex: ``$PRODUCT.name``),
22 * **#** comments.
23
24 .. note:: in this documentation a reference to a configuration parameter will be noted ``XXX.YYY``.
25
26 Description
27 ===========
28
29 .. _VARS-Section:
30
31 VARS section
32 -------------
33 | This section is dynamically created by salomeTools at run time.
34 | It contains information about the environment: date, time, OS, architecture etc. 
35
36 ::
37
38     # to get the current setting
39     sat config --value VARS
40
41 APPLICATION section
42 ------------------
43 | This section is defined in the application pyconf file.
44 | It contains instructions on how to build a version of SALOME (list of products and versions, compilation options, etc.)
45
46 :: 
47
48     # to get the current setting
49     sat config SALOME-xx --value APPLICATION
50
51 PRODUCTS section
52 ---------------------
53 | This section contains all the information required to build the products contained in the application.
54 | It is build from the products configuration files.
55
56 :: 
57
58     # to get the current setting
59     sat config SALOME-xx --value PRODUCT
60
61
62 .. _USER-Section:
63
64 USER section
65 --------------
66 This section is defined by the user configuration file, 
67 ``~/.salomeTools/SAT.pyconf``.
68
69 The ``USER`` section defines some parameters (not exhaustive):
70
71 * **pdf_viewer** : the pdf viewer used to read pdf documentation 
72
73 * **browser** : The web browser to use (*firefox*). 
74
75 * **editor** : The editor to use (*vi, pluma*). 
76
77 * and other user preferences. 
78
79 :: 
80
81     # to get the current setting
82     sat config SALOME-xx --value USER
83
84     # to edit your personal configuration file
85     sat config -e
86
87
88 Other sections
89 --------------
90
91 * **PROJECTs** : This section contains the configuration of the projects loaded in salomeTool by sat init --add_project command. 
92 * **PATHS** : This section contains paths used by saloeTools.
93 * **LOCAL** : contains information relative to the local installation of salomeTool.
94 * **INTERNAL** : contains internal salomeTool information
95
96 All these sections can be printed with sat config command:
97
98 ::
99
100     # It is possible to use sat completion mode to print available sections.
101     sat config SALOME-xx --value <TAB> <TAB>
102     > APPLICATION.       INTERNAL.          LOCAL.             PATHS. 
103     > PRODUCTS.          PROJECTS.          USER.              VARS.
104
105     # get paths used by sat
106     sat config SALOME-xx --value PATHS
107
108 It is possible to use sat completion mode to print available sections.