Don't assume you know which sJPK egments will be created.
[hooke.git] / doc / config.txt
1 *****************
2 Configuring Hooke
3 *****************
4
5 Hooke initializes a number of variables by reading configuration
6 files.
7
8 Syntax
9 ------
10
11 Hooke uses Python's configparser_ library to read the config files.
12 The format is similar to MS Windows' INI (initialization) format::
13
14     [My Section]
15     foo = bar
16     baz = 5
17
18 .. _configparser: http://docs.python.org/library/configparser.html
19
20 Examples
21 --------
22
23 Run::
24
25     $ ./bin/hk.py --save-config -c ''
26
27 or::
28
29     $ ./bin/hk.py -c 'save_config --output .hooke.cfg'
30
31 To write a well commented example config file to :file:`.hooke.cfg`.
32
33
34 Finding configuration files
35 ---------------------------
36
37 The default search path follows the `Filesystem Hierarchy Standard`_,
38 and so will probably need adjustment for non-\*nix systems.  The
39 default path list is
40
41 * :file:`/usr/share/hooke/hooke.cfg`
42 * :file:`/etc/hooke/hooke.cfg`
43 * :file:`~/.hooke.cfg`
44 * :file:`./.hooke.cfg`
45
46 but alternatives can be specified from the command line launching
47 Hooke (``--config FILE``).
48
49 .. _Filesystem Hierarchy Standard: http://www.pathname.com/fhs/
50
51 .. warning:: Any changes you make to the configuration during a Hooke
52   run will *not be saved* when Hooke exits.  To save the changes,
53   either run the `save config` command before closing Hooke, or start
54   Hooke with the ``--save-config`` option.