plantweb.defaults
¶Plantweb main rendering module.
read_defaults()
:
Get the defaults values.plantweb.defaults.
read_defaults
(cached=True)¶Get the defaults values.
Parameters: | cached (bool) – Read cached default values or determine them from
the list of providers. See DEFAULTS_PROVIDERS . |
---|---|
Returns: | A dictionary like DEFAULT_CONFIG with the user defaults. |
Return type: | dict |
plantweb.defaults.
DEFAULT_CONFIG
¶Default configuration for plantweb.
Note
The default engine will be used only when the engine was unset and it was unable to be auto-determined.
To set a different default configuration create a JSON file .plantwebrc
in your git repository root or in your home, as defined in
DEFAULTS_PROVIDERS
.
{'cache_dir': '~/.cache/plantweb',
'engine': 'plantuml',
'format': 'svg',
'server': 'http://plantuml.com/plantuml/',
'use_cache': True}
plantweb.defaults.
DEFAULTS_PROVIDERS
¶List of defaults providers ordered by read priority.
Last items will be processed last and thus will override previous values.
Available providers are:
git://
git rev-parse --show-toplevel
and then read the specified file from
that path.file://
~
is supported.python://
Will import the given variable or function:
DEFAULT_CONFIG
.['python://plantweb.defaults.DEFAULT_CONFIG',
'file://~/.plantwebrc',
'git://.plantwebrc']