def __runTranslator(): Msg.show("Execute: Translation Stage") content = Cli.cocoscats.runTranslator() if Cli.cocoscats.isWorkflowEditTrue("Translator"): Cli.__runEditor(Cli.cocoscats.frameworkParams["translatorPath"], Cli.cocoscats.frameworkParams["translatorPath"]) if Cli.cocoscats.isWorkflowDebugTrue("Translator"): Msg.showRaw(content)
def __runOutput(): Msg.show("Execute: Output Stage") content = Cli.cocoscats.runOutput() if Cli.cocoscats.isWorkflowEditTrue("Output"): Cli.__runEditor(Cli.cocoscats.frameworkParams["outputPath"], Cli.cocoscats.frameworkParams["outputPath"]) if Cli.cocoscats.isWorkflowDebugTrue("Output"): Msg.showRaw(content)
def __runAnalyzer(): Msg.show("Execute: Analyzer Stage") content = Cli.cocoscats.runAnalyzer() if Cli.cocoscats.isWorkflowEditTrue("Analyzer"): Cli.__runEditor(Cli.cocoscats.frameworkParams["analyzerPath"], Cli.cocoscats.frameworkParams["analyzerPath"]) if Cli.cocoscats.isWorkflowDebugTrue("Analyzer"): Msg.showRaw(content)
def __runDemo(): if not Cli.cocoscats.isWorkflowDemoEnabled() or \ Cli.cocoscats.getWorkflowDemoPluginCount() < 1: return Msg.show("Execute: Demo Stage") choices = Cli.cocoscats.getWorkflowDemoPluginChoices() menu = """----------------------------------------------- Please make a selection to run demo or 'x' to exit.\n""" i = 1 for choice in choices: menu = """{0} [{1}]: {2}::{3}()""".format(menu, i, choice["Name"], choice["Method"]) i += 1 menu = """{0} [x]: Exit """.format(menu) errMsg = "Error: Valid options are: [1-{0}]".format(i - 1) while True: Msg.showRaw(menu) response = input() if response == "x" or response == "X": break if not Text.isInt(response): Msg.showRaw(errMsg) continue response = int(response) if response < 1 or response >= i: Msg.showRaw(errMsg) continue j = response - 1 ret = Cli.cocoscats.runDemo(choices[j]["Name"], choices[j]["Method"]) if ret: Msg.showWarning("Demo returned an error")
def show(self): Msg.showRaw("Configuration") Msg.showPretty(self.__cfg) Msg.showRaw("Plugin Parameters") Msg.showPretty(self.__pluginParams) Msg.showRaw("Framework Parameters") Msg.showPretty(self.__frameworkParams)