From 8e42390807eedd85219ff69ab9fef251d7f894f2 Mon Sep 17 00:00:00 2001 From: Shawn Davis Date: Sat, 29 Jan 2022 20:47:39 -0600 Subject: [PATCH] Updated interim CLI to ignore explanations and screenshots in command output. --- sandbox/cli.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sandbox/cli.py b/sandbox/cli.py index c87096b..81054fb 100755 --- a/sandbox/cli.py +++ b/sandbox/cli.py @@ -121,8 +121,6 @@ This command is used to parse configuration files and output the commands. help="Load variables from a file." ) - - # Access to the version number requires special consideration, especially # when using sub parsers. The Python 3.3 behavior is different. See this # answer: http://stackoverflow.com/questions/8521612/argparse-optional-subparser-for-version @@ -215,6 +213,10 @@ This command is used to parse configuration files and output the commands. else: commands = list() for snippet in loader.get_snippets(): + # Skip explanations and screenshots. They don't produce usable statements. + if snippet.name in ("explain", "screenshot"): + continue + statement = snippet.get_statement() if statement is not None: commands.append(statement)