From e58167af68f0d54aa6423bc3330f5c286e50edaf Mon Sep 17 00:00:00 2001 From: "Ian H. Pittwood" Date: Tue, 9 Jul 2019 14:58:22 -0500 Subject: [PATCH] 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 --- spyglass/cli.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/spyglass/cli.py b/spyglass/cli.py index c5d53d3..1642801 100644 --- a/spyglass/cli.py +++ b/spyglass/cli.py @@ -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',