def flow_run(filename, headless, step_by_step): """ `automagica flow run <filename>` opens an existing Automagica Flow and executes it """ # Run FLow app = FlowApp( file_path=filename, run=True, headless=headless, step_by_step=step_by_step, ) app.run()
def flow_run(filename, headless, step_by_step): # Run FLow app = FlowApp( file_path=filename, run=True, headless=headless, step_by_step=step_by_step, ) app.run()
def flow_edit(file_path): app = FlowApp(file_path=file_path) app.run()
def flow_new(): app = FlowApp() app.run()
""" Protocol handler for automagica:// """ url = sys.argv[1] url = url.replace("automagica://", "") parts = url.split("/") os.chdir(os.path.expanduser("~")) # Automagica Flow (automagica://flow/new) if parts[0] == "flow": if parts[1] == "new": app = FlowApp() app.run() # Automagica Lab (automagica://lab/new) if parts[0] == "lab": if parts[1] == "new": app = LabApp() app.new() # Automagica Wand (automagica://wand) if parts[0] == "wand": app = WandApp() app.run() # Automagica Bot (automagica://bot/bot_secret/ABCD12345) if parts[0] == "bot": config = Config()
def flow_edit(file_path): """ `automagica flow edit <filename>` opens an existing Automagica Flow for editing """ app = FlowApp(file_path=file_path) app.run()
def flow_new(): """ `automagica flow new` creates a new Automagica Flow """ app = FlowApp() app.run()