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.


    How to save a Pythonista file on iCloud Drive

    Pythonista
    1
    1
    3645
    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.
    • cvp
      cvp last edited by cvp

      If you want to save a file from Pythonista (py, zip, text,...) into iCloud Drive, and if you have the Workflow app, you could:

      • create once a folder Pythonista in the Workflow folder on iCloud Drive

      • create once a Workflow, for instance named SavePythonistaFileInIcloudDrive, containing only these two actions:

        • Get Files from Dropbox
          • Show Dropbox Picker off
          • File Path /Pythonista/Clipboard
          • Error if not found on
        • Save File
          • Ask where to save off
          • iCloud folder /Workflow/Pythonista/
          • Overwrite if file exists on
        • Text File saved
        • Copy to Clipboard
          See workflow
      • run this script

      import webbrowser
      import clipboard
      Import time
      Import console
      filename = 'your file'
      #... save your file into Dropbox, for instance in a folder named Pythonista, 
      #... via a script you find easyly in these forums
      clipboard.set(filename)
      webbrowser.open('workflow://x-callback-url/run-workflow?name=SavePythonistaFileInIcloudDrive&input=clipboard&x-success=pythonista://')
      
      text = clipboard.get()
      while text != 'File saved':
      	text = clipboard.get()
      	time.sleep(0.3)
      
      console.alert(text)
      
      1 Reply Last reply Reply Quote 0
      • First post
        Last post
      Powered by NodeBB Forums | Contributors