Centralizes shared CLI options

This change moves all the shared CLI options between Spyglass and its
plugins back into the main Spyglass CLI file. The plugins will then
reference the main CLI file for these options instead of redefining
them in a future change.

Change-Id: I9a6fe7a7d84fed71c372beea9cf7d74a2f6430b1
This commit is contained in:
Ian H. Pittwood 2019-07-09 14:58:22 -05:00 committed by Ian Pittwood
parent 601f281191
commit e58167af68
1 changed files with 24 additions and 0 deletions

View File

@ -34,6 +34,30 @@ CONTEXT_SETTINGS = {
'help_option_names': ['-h', '--help'],
}
SITE_CONFIGURATION_FILE_OPTION = click.option(
'-c',
'--site-configuration',
'site_configuration',
type=click.Path(exists=True, readable=True, dir_okay=False),
required=False,
help='Path to site specific configuration details YAML file.')
INTERMEDIARY_DIR_OPTION = click.option(
'-d',
'--intermediary-dir',
'intermediary_dir',
type=click.Path(exists=True, file_okay=False, writable=True),
default='./',
help='Directory in which the intermediary file will be created.')
SITE_NAME_CONFIGURATION_OPTION = click.option(
'-s',
'--site-name',
'site_name',
type=click.STRING,
required=False,
help='Name of the site for which the intermediary is being generated.')
TEMPLATE_DIR_OPTION = click.option(
'-t',
'--template-dir',