omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular
    1. Home
    2. AriX

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    • Profile
    • Following 0
    • Followers 0
    • Topics 0
    • Posts 3
    • Best 0
    • Controversial 0
    • Groups 0

    AriX

    @AriX

    0
    Reputation
    680
    Profile views
    3
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    AriX Unfollow Follow

    Latest posts made by AriX

    • RE: Using Workflow app with Pythonista

      @briarfox Either works - argv lets you pass arguments one-by-one, and is what we use inside Workflow. See the documentation.

      posted in Pythonista
      AriX
      AriX
    • RE: Using Workflow app with Pythonista

      By the way, before the update comes out, you can simulate this behavior by doing the following in place of the Run Script action:

      Add a URL action, followed by Open URL and Wait to Return. Set the URL to something along the lines of along the lines of pythonista://[[script name]]?action=run&argv=[[some argument to pass, can be a variable]]

      We don't have URL encode actions yet, so this may be kind of limited at the moment.

      Let me also second the request to @omz to make Pythonista x-callback compliant ;)

      posted in Pythonista
      AriX
      AriX
    • RE: Using Workflow app with Pythonista

      Hey there - this is Ari, one of the creators of Workflow. Awesome that you all are trying to get this to work!

      Workflow should work great with Pythonista, but as some of you mentioned, there is currently an issue which prevents Workflow's Pythonista action from working correctly. This will be fixed in an update this week! Once the update is out, here is the general process I've used for integrating workflows with Pythonista scripts:

      Make a new workflow with some sort of content to be passed to the Pythonista script. For example, maybe a Text action. Then add Run Script and Get Clipboard.

      Make a corresponding Pythonista script and put its name into the Run Script action in your workflow. Start with this as your python script:

      import sys
      import console
      import clipboard
      import webbrowser
      
      console.alert('argv', sys.argv.__str__(), 'OK')
      clipboard.set('here is some output!')
      webbrowser.open('workflow://')
      

      This example shows how Workflow can provide input to the Python script (in this case, the Python script will show its input as an alert), and how the Python script can pass output back to Workflow via the clipboard.

      (Optionally, you could preserve the clipboard by backing it up when running the workflow. At the beginning of your workflow, add Get Cilpboard and Set Variable, and give the variable a name. Then, at the end of the workflow, add Get Variable followed by Set Clipboard.)

      posted in Pythonista
      AriX
      AriX