Example #1
0
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()
Example #2
0
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()
Example #3
0
def flow_edit(file_path):
    app = FlowApp(file_path=file_path)
    app.run()
Example #4
0
def flow_new():
    app = FlowApp()
    app.run()
Example #5
0
    """
    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()
Example #6
0
def flow_edit(file_path):
    """
    `automagica flow edit <filename>` opens an existing Automagica Flow for editing
    """
    app = FlowApp(file_path=file_path)
    app.run()
Example #7
0
def flow_new():
    """
    `automagica flow new` creates a new Automagica Flow
    """
    app = FlowApp()
    app.run()