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.


    Save Script via Open In directly to Pythonista

    Pythonista
    11
    18
    14558
    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.
    • mncfre
      mncfre last edited by

      Still trying to save the .pyui but workflow seems to manage the .pyui as binary, I can't use the clipboard for now and I don't like the dropbox solution, if some of you have some idea please tell us here.

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

        Just rename the pyui as text or py. It is a pure textfile.

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

          Thats a good idea but I'm looking for a more automatic solution that avoid changing the extension manually, I'm gonna try something like that but in workflow

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

            Script updated to ask file extension, using the @JonB suggestion, so if you have a .pyui change its extension to .py then “open in” then in pythonista select .pyui extension, it’s not perfect but it’s all I have now.

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

              @ccc I was in Dropbox. Wishful thinking :[

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

                @techteej that's because when you "open in" from Dropbox it actually don't open the file, it generate a link of the file, in theory I can do a workflow especially for Dropbox of you need it

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

                  If using this with the dropbox app, you just need to add a step. Tap share>open in>run workflow instead of going directly to run workflow.

                  I have updated both the script and the workflow. The changes are as follows:

                  Workflow: I kept getting the wrong file name, so I updated the workflow to pass the right file name to pythonista. I also made the Documents folder the default with the option to add to the path. I don't know if the way I set up the default folder will be the same on all devices or not.

                  Script: I changed the system argument index, which was giving me an out of range error and made it so that instead of printing the path, the file is opened once it is created. Finally, I made an option for other file types where you can type in the file extension.

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

                    Workflow: I kept getting the wrong file name, so I updated the workflow to pass the right file name to pythonista. I also made the Documents folder the default with the option to add to the path. I don't know if the way I set up the default folder will be the same on all devices or not.

                    Script: I changed the system argument index, which was giving me an out of range error and made it so that instead of printing the path, the file is opened once it is created. Finally, I made an option for other file types where you can type in the file extension. Script

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

                      I get an error running this script
                      No such file directory

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

                        @jaredbidlow, Pythonista 2.0 provides appex, so you don't need Workflow and the clipboard anymore to Open in Pythonista. See e.g. https://forum.omz-software.com/topic/2494/appex-getfromurl-to-share-from-other-apps-to-pythonista for an alternative

                        1 Reply Last reply Reply Quote 2
                        • Webmaster4o
                          Webmaster4o last edited by

                          @jaredbidlow This is almost completely useless now. There's a much simpler way to do this now that doesn't require Workflow.

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

                            Or see Save Attachment

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

                              I've updated this script, as well as the associated Workflow, to make it more reliable and work with Pythonista 2, as well as allow for replacing the file extension on save. https://gist.github.com/ScottSmith95/2f9b249f9e6e0e9fc6ef

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