NEWS for cliapp
===============

Version 0.14, released 2011-07-20
---------------------------------

* Start and end of program are now logged. This makes it easier to read
  log files.
* Commands run by the `runcmd` method are now logged.
* Bugfix: `runcmd` now passes extra arguments to `subprocess.Popen`.
* A `Settings.require` method is added, so that it's easy to fail if the
  user has failed the give an option that is required in a given situation.
  (Mandatory options are a bit weird, but sometimes they happen.)
* Subcommands may now be added explicitly, using the 
  `Application.add_subcommand` method. This is helpful for applications that
  support plugins, for example.

Version 0.13, released 2011-06-18
---------------------------------

* Change default log level to be `debug`. Nothing is logged unless the
  user requests it, and if they do, they probably want to debug something,
  so this seems like the natural default.
* Log files are now rotated. See options --log-max, --log-keep.
* Log files are formatted in a nicer way now.
* Now registered with PyPI.
* String list settings now have a more sensible handling of default values.
  Previously the default value would always be used and user-supplied
  values would be appended to the default. Now user-supplied values
  replace the default value entirely.
* The old API for adding settings (`self.settings.add_string_setting` etc)
  is gone. This should not bother anyone, since I am the only known user
  of cliapp so far, and I've fixed my stuff already.
* A `metavar` is provided if caller does not provide one. This fixes
  `--generate-manpage` issue where an option would be documented as not
  having an argument unless `metavar` was set explicitly.
* `cliapp.Application.runcmd` runs external programs and captures their
  standard output.
* The option parser is now created in a separate method than the one that
  uses it. This allows applications to modify the option parser in whatever
  way they want.
* Only the basename of a program (from `sys.argv[0]`) is used when
  determining `progname`. This fixes a problem where config files
  could not be found because `progname` contained slashes.

Version 0.12, released 2011-05-29
---------------------------------

* The new option `--generate-manpage` allows one to fill in the OPTIONS
  section of a manpage.
* `cliapp` now supports **subcommands**, e.g., "git help".
* API documentation is now formatted using Sphinx.

Version 0.11, released 2011-03-21
---------------------------------

* `pydoc cliapp` now works more usefully, and includes documentation for
  the various classes exported, not just a list of packages.
* Bugfix: if user specifies no log file, logging no longer happens to
  the standard output. This prevents exceptions from being reported twice.
* Log format now includes timestamps.
* New settings can now be added using shorter method names:
  `self.settings.string` rather than `self.settins.add_string_setting`.
  The old method names continue to work.

Version 0.10, released 2011-03-21
--------------------------------

* The `metavar` argument for `optparse.OptionParser` can now be set for
  settings. This makes for prettier `--help` output.
* The default value for integer settings is now 0, not `None`.
* [[README]] now has some more documentation of how to use the framework.

Version 0.9, released 2011-03-21
--------------------------------

* Bugfix: Boolean options now work correctly, even in --help output.

Version 0.8, released 2011-03-20
--------------------------------

* Bugfix: duplicate option names in --help output fixed.
* Exception handling has been improved: stack traces are now logged, and
  there's a `cliapp.AppException` base class for application exceptions,
  which will cause an error message to be written out, but no stack trace.
  All other exceptions cause a stack trace, so as to make it easier to debug
  things.

Version 0.7, released 2011-03-12
--------------------------------

* Add configuration file support.
* API change: all settings are now in a class of their own, and are accessed
  via `app.settings`, e.g., `app.settings['output']`. See the `cliapp.Settings`
  class. This change breaks old code, sorry. But since I am still the only
  user, nobody minds.
* The callback setting type is now gone.
* Application name can now be set via the Application class's initializer
  (optional `progname` argument), or by assigning to 
  `cliapp.Settings.progname`. If not set explicitly, it is set from
  `sys.argv[0]`.

Version 0.6, released 2011-02-19
--------------------------------

* New option types: list of strings, choice of strings, callback.
* New standard option: --dump-setting-names.
* Python profiling support: automatically if the right environment variable
  is set. If the process's argv[0] is 'foo', and 'FOO_PROFILE' is set, then
  profiling happens.
* Documentation improvments.

Version 0.5, released 2011-02-13
--------------------------------

* Catches exceptions and prints error message, instead of having the Python
  interpreter do a stack trace.
* Support more traditional Unix command line filter behavior: read from
  stdin if no arguments are given, or a dash ('-') is given as the filename.
* Count files and lines in files.
* New options: --output, --log, --log-level.


Version 0.4, released 2011-01-30
--------------------------------

* Bugfix: Subclasses can now actually set the application version, so
  that --version works.
