omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    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.


    Force reload in workflow

    Editorial
    5
    10
    6546
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • derickfay
      derickfay last edited by

      Hi
      Is there any way to pause a workflow and wait for the latest version of a file to come in from dropbox? I have a workflow called from Drafts, so the file it operates on isn't necessarily open in advance. Frequently what happens is that the action runs, calls the workflow, Editorial loads the locally cached version, the worklow makes the edits as expected, THEN the latest version gets loaded from dropbox, wiping out the changes.
      Thanks
      Derick

      1 Reply Last reply Reply Quote 0
      • derickfay
        derickfay last edited by

        Still would love this in 1.2.1 ... this is the biggest frustration I find in using Editorial.

        1 Reply Last reply Reply Quote 0
        • Jozh
          Jozh last edited by

          import time

          # Wait for 5 seconds
          time.sleep(5)
          

          This is what I use on the iPhone while its running I hit the Dropbox sync button manually. You can change the (5) to what ever you like. If you are on a iPad you can use the pause before running that is the custom action menu that is in ever action in a workflow.

          1 Reply Last reply Reply Quote 0
          • ccc
            ccc last edited by

            What about an approach that watched for changes in Dropbox.delta or Dropbox.metadata.rev or .revision?

            1 Reply Last reply Reply Quote 0
            • derickfay
              derickfay last edited by

              @Jozh I tried that but with that much delay and extra clicks I might as well just open editorial directly, open the file, move the cursor and paste. I'd just like a way to have a workflow do the refresh rather than need to do it manually.

              @ccc I've been reluctant to take the time to investigate the dropbox api as it seems like overkill when all I need is to sync a single file.

              1 Reply Last reply Reply Quote 0
              • ccc
                ccc last edited by

                Is it just me or are these two statements contradictory?

                this is the biggest frustration I find in using Editorial.

                and,

                I've been reluctant to take the time to investigate [the available solution].

                1 Reply Last reply Reply Quote 0
                • ccc
                  ccc last edited by

                  Watch a Dropbox file (or directory) until it changes and the return the Dropbox metadata for that filepath: dropbox_change_watcher.py

                  1 Reply Last reply Reply Quote 0
                  • consequently
                    consequently last edited by

                    This looks like it's pointing us in the right direction.

                    Does anyone have any pointers as to how to use this in a workflow action that will pause until the given file is up-to-date with the current dropbox version?

                    1 Reply Last reply Reply Quote 0
                    • omz
                      omz last edited by

                      I've added a simple "Sync with Dropbox" workflow action in the latest beta. It basically triggers a manual sync, and then waits for it to finish before the next action starts, so nothing fancy, but might be useful for some workflows... Since I've also fixed some pretty critical bugs on iOS 7, I intend to submit this version (1.2.1) for review very soon.

                      1 Reply Last reply Reply Quote 0
                      • derickfay
                        derickfay last edited by

                        Thanks...that's exactly what I need.

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post
                        Powered by NodeBB Forums | Contributors