Git Product home page Git Product logo

pythonistascripts's Introduction

PythonistaScripts

Scripts for use with the Pythonista iOS application

This repository should generally be considered archived, as the original purpose was to allow getting files in & out of Pythonista, which was added to the application about 2 years after these scripts were created.

pythonistascripts's People

Contributors

dhutchison avatar glitchassassin avatar karlic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pythonistascripts's Issues

Name not defined problem

I'm getting name not defined error on line 72:

files_found = does_directory_contain_files(config, full_path)

I'm not sure how to get it to work. I'm new to pythonista.

Hidden file or directory starting with "."

DropboxSync.py cannot handle these cases correctly.
When encounter a hidden file or directory, it will raise OSError: no such file or directory.

if not os.path.exists(local_folder):
        os.mkdir(local_folder)

Maybe iOS does not allow app to create a hidden file or directory inside the container? Can we simply skip these files and directories?

Commands d, da, l, la, etc. are inconsistent.

Having looked at the prompts and commands, it seems that d/da has three different meanings/functions and l/la two. I think this makes their use confusing and could lead to mistakes. Could they be renamed to make them more intuitive?

File %s is in the sync cache and on Dropbox, but no longer exists locally. (Default Delete):
Delete From Dropbox (d) [All in this state (da)]
Download File (l) [All in this state (la)]
Skip (s) [All in this state (sa)]

File %s has been updated both locally and on Dropbox. (Default Skip) Overwrite: 
Dropbox Copy (d) [All in this state (da)]
Local Copy (l) [All in this state (la)]
Skip (s) [All in this state (sa)]

File %s is not in the sync cache but exists both locally and on dropbox. (Default Skip) Overwrite:
Dropbox Copy (d) [All in this state (da)]
Local Copy (l) [All in this state (la)]
Skip (s) [All in this state (sa)]

File %s is in the sync cache but no longer on Dropbox. 
(Default Delete):
Delete local file (d) [All in this state (da)]
Upload File (u) [All in this state (ua)
Skip (s) [All in this state (sa)]

Error in write_configuration()

After going through the process of entering the appkey and appsecret and allowing acccess, I get a TypeError: set (['dropbox_sync/file.cache.txt']) is not JSON serialiable in write_configuration (at line 40).

Initial sync aborts with UnboundLocalError

'choice' referenced before assignment. I think this is the correct fix:

@@ -320,3 +320,3 @@ Skip (s) [All in this state (sa)]
                                        if prev_choice in ('la', 'da', 'sa'):
-                                               choice = choice[0]
+                                               choice = prev_choice[0]
                                        else:

No JSON object could be decoded

I ran smoothly up until yesterday, and then today "No JSON object could be decoded" error appear.
I tried to upload your original file again but same message appear.

subfolders.

Hi I'm not sure if I have this exact version of the script. The version I have has some problems with syncing subfolders for example if there is externally ...

FolderA/ (files) + (FolderB)/files

when it downloads in pythonista it creates two folders with the one with the subdirectory being lowercase

foldera/folderb/files

and

FolderA/files

Does this version of the script exhibit this behavior?

Add a version check

There is a lot of enhancements / bug fixes being done to the Dropbox sync script. A non-intrusive, optional version check may be useful - any opinions?

Remote deletions are ignored

  1. create new file on iPhone
  2. sync
  3. delete the file on the Dropbox website
  4. sync

The last sync does and reports nothing. The file on the phone is left alone.

Disable automatic screen turn off

Add console.set_idle_timer_disabled(...) to disable automatic screen off.
You maybe add a config line for that, if someone don't want to disable.

Document usage of script

Old blog page does not cover additional run options and how to now use the script. This documentation needs brought up to date.

Feature request

It would be nice to provide an option (answer) to use the answer given to all subsequent question. E.g. if DropboxSync ask whether to delete or keep the file in the Dropbox directory, the user has now two possible responses. If the user adds an R (for repeat) in front of the normal resonse, this could be in following similar questions without asking the user. Particularly if whole subdirectories are moved or deleted, this is much more convenient.

I hope this is clear to you. If not, please let me know.

Feature request

I like the new functionality to specify the extensions to be syncronized. In order to do a full backup, it would be nice if it was possible to add a wildcard extension (*) to specify all extensions.
What do you think?

Dangerous instruction could lead to accidental deletion

Lines 211 and 212 have the same instruction for download and deletion.

Delete From Dropbox (d) [All in this state (da)]
Download File (l) [All in this state (da)]

Typing da would result in deletion NOT download.

The issue arises because [D]elete and [D]ownload start with the same letter. Why not use

  1. [R]emove From Dropbox and [D]ownload File or
  2. [D]elete From Dropbox and [G]et File

I prefer 1.

Progress report is missing

I don't see how the sync goes, a path\filename line by line would be enough.

Uploading: Tools\dummy.py
No change: Tools\backup.py
Downloading: Tools\admin.py

or something like that.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.