abstractfactory/publish — pull request #52 by mottosso (2014-08-23 08:53:36+00:00)
Title: Second pass on the configuration system

An updated configuration system, with cascading user-configuration.

In a nutshell, it mimics the configuration of Sublime and Maya amongst others in that it provides a default configuration, `config.json` and also looks for configuration in the users HOME directory. This allows users to store only modified variables in on their local computer that will override the behaviour or Publish, such as which identifier to look for within Maya (currently `publishable`) or which regex to use when looking for validators and so forth.

The configuration would persist inbetween updates of Publish and even across installs, and could be persisted either locally or on a central server so as to provide updates for an organisation; similar to `userSetup.py` of Maya.

From the doc-string or `config.py`:

```python
"""Publish configuration

Configuration is copied into the users HOME directory
upon first use.

Usage:
To alter the configuration of Publish to suit your needs,
simply modify your own copy located at /.publish

It is a JSON-formatted, plain-text file.

Members of the configuration is then accessed via dot-
notation.

>>> import publish.config
>>> assert publish.config.identifier == 'publishable'

Attributes:
identifier: How to distinguish between publishable instances
prefix: Relative root-directory for extracted instances
date_format: Format with which to date extracted instances
paths_environment_variable: Which variable to look for added
plugin paths.
*_regex: Regular expression for finding the various plugins.

"""
```