# HG changeset patch # User Mads Kiilerich # Date 1581822974 -3600 # Node ID b1eee51194161e7795302fbad24ca1fefdd6c3e6 # Parent a75f3e12583adb58f7fe0fa50c1d68b62d5d2835 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 . diff -r a75f3e12583a -r b1eee5119416 kallithea/bin/kallithea_cli_config.py --- 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)