Debian Codegraph @

contrib/ls-config/doc/bin.api.txt

raw
1 Instalation:
2 ------------
3
4 First place somewhere ls-config binary, or make it from source
5
6 Then if You woud like use it with national translation, then You muas build
7 it form source and then copy *.mo files according to You system
8
9 Usage:
10 ------
11
12 Remember to call ls-config always with -f parameter,
13 wich give ls-config inormation wich config file use.
14
15 Then this program operate in three based modes:
16 -g (get) for reading values (default)
17 -s (set) for store values
18 -h (help) for display help message
19 both parameter (-g and -s) nedd to give it variable path
20 (internal configuration variable path)
21
22 for exapmle read info value from config file:
23 ls-config -f config -g info
24
25 Then You can set this value to another
26 ls-config -f config -s info -d "Somethint to write"
27
28 But when You wand to addn new configutation variable you must
29 specify his type:
30 ls-config -f config -s someint -d 10 -p int
31
32 You can remove (unset) variable too. This is subfunstion of setting:
33 ls-config -f config -s someint -u
34
35 When reading You cent use following flag:
36 -v - read only variable valut
37 -t - read only variable type
38 -c - read only variable element count (sense only in types: array, list, group)
39 -i - read only variable index (sense only in type: array, list)
40 -n - read only variable name
41
42 and sometimes usable
43 -q - to wori in quiet mode usable in scripts.
44
45 For example to read variable somevar type, where variable in group foo:
46 ls-config -f config -g "foo.somevar" -t
47
48 For detailed list of parametera (long options available too) run ls-config
49 in help mode:
50 ls-config -h
51
52 Configuraiton files:
53 --------------------
54
55 Detailed configuration file shema are publicated on:
56 http://www.hyperrealm.com/libconfig/
57 And his gramar on:
58 http://www.hyperrealm.com/libconfig/libconfig_manual.html#Configuration-Files
59
60 there are only short describe:
61 configuration = setting-list | empty
62 setting-list = setting | setting-list setting
63 setting = name (":" | "=") value (";" | "," | empty)
64 value = scalar-value | array | list | group
65 value-list = value | value-list "," value
66 scalar-value = boolean | integer | integer64 | hex | hex64 | float | string
67 scalar-value-list = scalar-value | scalar-value-list "," scalar-value
68 array = "[" (scalar-value-list | empty) "]"
69 list = "(" (value-list | empty) ")"
70 group = "{" (setting-list | empty) "}"
71 empty =
72
73 smaple configuration file and script are available on sample/ directory
74 config - samble configuration file
75 script - sample script, then read info variable from config file