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.
Sync files with Dropbox
-
@bennr01 Thanks for the clarification and the links. It is unfortunate that syncing between your own devices can't be built in because of this.
-
If you just want to grab a script from your Dropbox, here's a simple 8-liner that does it using the share sheet. Put this in your pythonista share sheet extensions, then from the Dropbox app, run the script, and the script will land in your pythonista file system with no fuss or muss.
https://gist.github.com/paultopia/23703b934c442a54808e245d9418545a
-
In order to work with the new Dropbox API V2 I have written a new synchronization app. The instructions for installation and configuration are documented on my blog page Pytopia. I have been using the new app on my iPad and iPhone for about a week and it seems to be working pretty well. I would love to have other eyes on it.
-
@markhamilton1
Set up the app in dropbox as per your instructions. When I run the Sycronator script I get an error: 'FileMetaData object has no attribute 'content_hash'. I am using the app store version of Pythonista 2.11. Is the script designed to run in Pythonista 3? What directory does the script belong in, it's own, or the Pythonista root directory? I assume the DropboxSetup script goes in the site-packages folder where it can be imported by other scripts that need Dropbox access. -
@markhamilton1 Please consider converting the gists into a GitHub repo so that we can submit pull requests (suggestions for improvement).
Step one would be to add the line:
from __future__ import print_function
At the top of your script files before all other imports and then fix up the print statements. This will help to get your scripts working with both Python 2 and Python 3.
@omz Please consider adding "Publish to Repo" functionality to Pythonista.
-
def valid_filename_for_upload(filename): return not any((filename == STATE_FILE, # Synchronator state file filename.startswith('.'), # hidden file filename.startswith('@'), # temporary file filename.endswith('~'), # temporary file filename.endswith('.pyc'), # generated Python file filename.endswith('.pyo'))) # generated Python file
-
@coomlata1
Be sure you have the latest version of the dropbox package installed. It is 7.2.1.import dropbox
print dropbox.version@ccc
I am also uploading a new version of the Synchronator.py file with changes suggested by @ccc. -
@ccc
I tried changing the test to use any but it gave me an error. I will keep looking into it though.Thanks for the feedback!
-
Sorry @markhamilton1 my mistake. Any() takes an iterator so you need to bundle all the arguments into a tuple. I have fixed the code above. If you copy and paste that, it should work now.
-
@ccc
Thanks! That is an awesome pattern! I have updated the code. I will create a git repo today sometime. -
There is now a git repo for the code for all of you that would like to add to it.
It can be found at
https://github.com/markhamilton1/Synchronator/tree/master
This is open source, no license, no waranty, use at your own risk, blah blah blah. Welcome to a world run by lawyers.