Mercurial > kallithea
changeset 8261:b1eee5119416
config-create: show options used for generating .ini, and list what alternative values are supported
Give users a better hint that they should specify web server when generating .ini .
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Sun, 16 Feb 2020 04:16:14 +0100 |
parents | a75f3e12583a |
children | 66670aff96c5 |
files | kallithea/bin/kallithea_cli_config.py |
diffstat | 1 files changed, 10 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/bin/kallithea_cli_config.py Sun Feb 16 04:16:14 2020 +0100 +++ b/kallithea/bin/kallithea_cli_config.py Sun Feb 16 04:16:14 2020 +0100 @@ -89,6 +89,16 @@ mako_variable_values.update({ 'uuid': lambda: uuid.uuid4().hex, }) + + click.echo('Creating config file using:') + for key, value in inifile.default_variables.items(): + if isinstance(value, str): + options = inifile.variable_options.get(key) + if options: + click.echo(' %s=%s (options: %s)' % (key, mako_variable_values.get(key, value), ', '.join(options))) + else: + click.echo(' %s=%s' % (key, mako_variable_values.get(key, value))) + try: config_file_abs = os.path.abspath(config_file) inifile.create(config_file_abs, mako_variable_values, ini_settings)