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.


    Sync between devices, how to?

    Pythonista
    8
    23
    22238
    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.
    • Balur
      Balur last edited by

      @ccc It's upload only .py files, and only in one folder deep. Is this working as expected?

      1. Sketchpad/HelloWorld.py
      2. Projects/RandomThing/RandomThing.py

      First file uploaded, second not. Pyui files and .txt neither.

      I find where can I add more file type to the jam, but not the nested directories.

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

        I opened an issue https://github.com/dhutchison/PythonistaScripts/issues/2 ... Hopefully someone will propose a pull request to fix that issue. I believe that @hyshai at one point had a fix for nested folders.

        Now that I look at it more, I used https://gist.github.com/sidewinder42/8631794 in the past and you recommended https://gist.github.com/freekrai/4183134 which are both forks of https://gist.github.com/wrenoud/4049625 but all three are gists. There are 16 forks of wrenoud's original and the forks have forks...

        We need a repo for this codebase so that we can do some collaborative improvement. The freekrai fork is just an earlier version of wrenoud while the sidewinder version is an improvement to prevent crashing. @sidewinder would you be willing to convert https://gist.github.com/sidewinder42/8631794 into a repo or should I just do that?

        Balur 1 Reply Last reply Reply Quote 1
        • upwart
          upwart last edited by

          I have succesfully installed dhutchinson DropboxSync. Everything works perfectly, but ... only for .py files. I would like to sync sound and image files as well, particularly to download them from a Windows platform.
          Is there a way to sync these files as well?

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

            @upwart I know there is a better approach, but I did the following 3 line modifications:

            Add this line top level, around line 20:
            FILE_FILTER = ('.py','.pyui','.txt')

            Replace line 122:
            before: if file['is_dir'] == False and file['mime_type'].endswith('python'):
            after: if file['is_dir'] == False and file['path'].endswith(FILE_FILTER):

            Replace line 250:
            before: if not file in processed_files and not os.path.isdir(file) and not file.startswith('.') and file.endswith('.py'):
            after: if not file in processed_files and not os.path.isdir(file) and not file.startswith('.') and file.endswith(FILE_FILTER):

            @ccc Thank you for opening an issue about nested folders, hope someone will pick it up soon.

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

              See @DavidHutchison response https://github.com/dhutchison/PythonistaScripts/issues/2 -- He is working on it.

              Your proposed changes above would make a great pull request. I had not realized that str.endswith() can take a tuple... That is supercool.

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

                I've pushed a new version with nested folder support & includes pyui files.

                Additional extensions are easy to add now if someone wants to submit a PR with additions (there is a collection called SUPPORTED_EXTENSIONS near the start of the file).

                Thanks for the interest in the script, it was only written as something to introduce me to Python and pythonista!

                Balur 1 Reply Last reply Reply Quote 1
                • upwart
                  upwart last edited by

                  @DavidHutchison
                  Thanks for this update. It's a great tool.

                  1 Reply Last reply Reply Quote 0
                  • Balur
                    Balur @DavidHutchison last edited by

                    @DavidHutchison Thank you for your update. I tested in my enviroment and I bumped into 2 issues.

                    DavidHutchison 1 Reply Last reply Reply Quote 0
                    • DavidHutchison
                      DavidHutchison @Balur last edited by

                      @Balur both bugs now resolved.

                      The feature request (for skip folders) is technically in the code (SKIP_FILES collection can be added to with paths relative to the root), but I'm leaving that issue open for now. I feel a configuration file will be a more maintainable approach going forward than having anyone using this having to keep track of their own code changes through updates.

                      Balur 1 Reply Last reply Reply Quote 0
                      • Balur
                        Balur @DavidHutchison last edited by

                        @DavidHutchison Thank you again. With SKIP_FILES collection, can complete folders be skipped without add file by file? Config file is a good direction. I'm definitely looking forward to it.

                        Yesterday I also found two more issues about empty folders and re-uploading deleted files.

                        DavidHutchison 1 Reply Last reply Reply Quote 0
                        • DavidHutchison
                          DavidHutchison @Balur last edited by

                          @Balur yes whole folders work (I checked it when working on the fixes).

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

                            I know Apple's restrictions prevent access to other syncing services from something that can run code (such as Pythonista), but does that also apply to a Pythonista-specific folder on Apple's own iCloud Drive?

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

                              Yes it does.

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