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.


    Dropbox File Picker

    Pythonista
    14
    26
    84569
    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.
    • omz
      omz last edited by

      I thought now that there's no Open in... anymore, I'd build a little UI/script to get files from Dropbox into Pythonista more easily:

      → Dropbox File Picker.py (GitHub)

      It's pretty basic – once you've completed the setup (you need to configure some things in the Dropbox Dev Center), you'll get a list of folders and files in your Dropbox. You can drill down the folder hierarchy and download files one at a time. They're saved to the root folder of the Pythonista script library; if a file with the same name already exists, a numeric suffix is appended automatically. The UI could be prettier, but it gets the job done.

      Screenshot

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

        Thanks for this. One question. Why was losing "Open In" functionality such a big deal? I didn't frequently use it except to import the occasional PDF. I never really found any .py files to import using "Open In." It was mostly either copy/pasting or downloading from Github to import files.

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

          Viruses and malware most likely.

          1 Reply Last reply Reply Quote 0
          • ?
            A Former User last edited by

            Yeah, I guess, but all the apps in iOS are sandboxed by the kernel (which is kind of annoying sometimes) so any malware imported into Pythonista through "Open In" would be contained within the app package. I think Apple just implemented this to be fair to the other programming apps it removed "Open In" functionality from, like <a href="http://codea.io/">Codea</a>. Just another one of Apple's paranoid restrictions....

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

              @omz Thanks! It's very useful.

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

                Thank you this is really helpful.

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

                  @omz Hi, hope you are fine! Can you please help me for the same to BOX account...

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

                    Has anyone done something similar for Box or Google Drive?

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

                      Dropboxsync.py gets the following error message:

                      App folder (sandbox) access attempt failed because this app is not configured to have an app folder. Should your access type be 'dropbox' instead?

                      What am I missing?

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

                        See OMZ's posts in http://omz-forums.appspot.com/pythonista/post/6675908186341376 You need to create a Dropbox app in order to get this to work. Go to http://dropbox.com/developers/apps to create one.

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

                          Hmm...I had already created an app at .../developers/app and File Picker works fine...it is dropboxsysnc that gets this message.

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

                            @ihf The file picker expects a Dropbox app that has full access, while the dropboxsync script uses the app folder approach, so you need to create two different Dropbox apps...

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

                              @omz OK, I created another Dropbox app with Permission type="app folder". However, I am getting the same error message from dropboxsync. Is there anything else I need to configure (besides providing the appropriate App key and App secret)?

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

                                I got it to work (needed to run dropboxlogin before running dropbox sync and then authorize the app on the web) However, each time I run dropboxsync, it downloads everything (or that's at least what it says), then uploads some files and then hangs. I run it again and it may get a little further before hanging. After numerous tries, I've yet to see it run to completion (and sync everything).

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

                                  You might try putting console.set_idle_timer_disabled(True) at the top of the script to keep you device awake for the entire sync.

                                  If it hangs with an exception, what error text gets printed?

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

                                    I could try that except I touch the screen while it is running to make sure it doesn't sleep. I have now run it more than a dozen times and it will always run for awhile and seemingly finish downloading but never finishes uploading. There is no error message, just sits there until I kill Pythonista.

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

                                      I added the console.set_idle_timer_disabled(True) and it did not help. I find that it can hang during the download or the upload process (more likely the latter) but it is as if Dropbox just stops responding for some reason.

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

                                        Plug your iOS device into a power supply and let the sync run overnight.

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

                                          I think I may have found the problem. DropboxSync does not seem to run (reliably) on an iPad mini 1. I ran it on an iPad 3 and it never paused and ran to completion the first time. Maybe the iPad mini is not fast enough to keep up with the Dropbox protocol? If so, perhaps the script could be altered to operate with a slower processor.

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

                                            Hi, thanks for this. I have done everything and the script works fine and opens dropbox folder and etc. my only problem is that the pop up window is a tiny rectangle. How to fix this? (Using latest beta)

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