# HG changeset patch # User Jeff Hammel # Date 1332958693 25200 # Node ID 451aeb35ec04b43ea8c9390c2093672d7d5ba290 # Parent 92c11cd1d27e1dc00c8fdf6fccaed055efe80dc9 outline what options are available for ``value`` diff -r 92c11cd1d27e -r 451aeb35ec04 README.txt --- a/README.txt Wed Mar 28 11:05:29 2012 -0700 +++ b/README.txt Wed Mar 28 11:18:13 2012 -0700 @@ -21,6 +21,23 @@ ``name`` is the name of the configuration option, and ``value`` is a ``dict`` that gives the form of the option. +``Configuration`` transforms these options into ``OptionParser`` options. + +Options for ``value`` include: + + * help : what the option is about (translated to command line help) + * default: default value for the option + * required: if a true value, this option must be present in the + configuration. If ``required`` is a string, it will be displayed if + the option is not present. If the default is defined, you won't + need required as the default value will be used + * type: type of the option. Used to control the parsing of the option + * flags: a list that, if present, will be used for the command line + flags. Othwise, the option name prepended by ``--`` will be used. + To disable as a command line option, use an empty list ``[]`` + +In addition, you may extend ``Configuration`` and have additional +useful items in the ``value`` dict for ``options``. For an example, see http://k0s.org/mozilla/hg/configuration/file/c831eb58fb52/tests/example.py#l7