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.


    Outliner with drag/drop reordering - part 2

    Pythonista
    9
    589
    180598
    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.
    • ihf
      ihf last edited by ihf

      @cvp Yes but you can do this:

      import shortcuts
      shortcuts.open_shortcuts_app(name="dj",shortcut_input="Hello World" 
      

      The Shortcut looks like this: https://www.icloud.com/shortcuts/a944a4779c0c4c71861a402cb6b6a138

      Then it is easy to get to Datajar values from a shortcut that is run on the watch.

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

        @ihf Did you try it? That will say that at each save of an outline file, I should run a shortcut, passing the text part of the outline? Agree?

        To be compared to update a calendar event (fixed date, title = outline name) with its notes field = outline text part. And shortcut on Apple watch can show a list of all such events, user select one and show the text.

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

          @cvp Yes I tested saving text from Pythonista to Data Jar. However, your idea of using the calendar may turn out to perform better as it does not depend on a 3rd party app. Also, depending on the formatting, the calendar route might offer a way to see an outline on the Mac. (There is a DataJar for the Mac in beta but I have not tried it).

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

            @ihf I guess that is possible on Mac to read calendars, but I don't know how in Python (quid about Two-factor authentication?).

            But is my script on Mac not sufficient? Read the outline file is not better?

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

              @cvp Reading the outline with Python is better although having it in the calendar as you suggested would also make it readable on the watch as well as on the Mac without any additional programs. I’m just not sure how usable it will be on the Watch given the display limitations and the inability to check off outline items. I’m happy to try it, if you implement it (either with Datajar or the calendar).

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

                @ihf said:

                the inability to check off outline items

                What do you mean? Mac and Apple Watch would only be used to read the outlines, not to update them by checking them, isn't it?

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

                  @cvp yes, I was just thinking that without any even minimal interaction capability and given the size of the display and the amount of text it can show, reading outlines on the watch may be of limited utility. But without trying it, I can’t really know for sure.

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

                    @ihf if you want to try on an Apple Watch, create a calendar event

                    • in calendar named "Outline"
                    • on 2022/01/01 01:00
                    • notes = text of your outline like seen by Files/send to app/.txt

                    See it with this shortcut

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

                      @cvp I had to change the date in the Shortcut to 1/1/2022 01:00 but it worked well…very fast on the watch.

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

                        @ihf yes, sorry, 01:01. Do you think you could use it on your watch? If yes, do you want I modify outline.py to generate such an event? And if yes, agree for calendar name, date, time?

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

                          @cvp yes, it is usable on the watch and is a good enhancement

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

                            @cvp I was trying to get someone to try out Outline and they did not have the support files. They got the message in the console that had links to the 5 or so support scripts. Could you possibly change that so that if it does not find the files, it asks if the user wants to do the download (using requests)? It could greatly simplify getting someone started with Outline.

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

                              @ihf I know and it is on my todo list but not yet done (I'm in a foreign country for the week).

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

                                @ihf V01.05 and outline.versions with

                                Version V01.05
                                  - automatic download of needed modules 
                                

                                It seems that for blackmamba module, this automatic process does not work.
                                If it is the case, you get in the console an explanation message to download the blackmamba folder.

                                It is only needed to execute in the console the installation action foreseen by the author:

                                import requests as r; exec(r.get('http://bit.ly/get-blackmamba').text)

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

                                  @cvp I ran v1.05 on my iPad and it gave 4 messages about needing modules that were already there (not sure which but I think it include swizzle and gestures). After accepting, the script ran fine. Perhaps it is not looking in all the valid places?

                                  cvp 2 Replies Last reply Reply Quote 0
                                  • cvp
                                    cvp @ihf last edited by cvp

                                    @ihf said:

                                    Perhaps it is not looking in all the valid places?

                                    Perhaps you did not install them at the right place 😂
                                    I guess they are all in sites-packages, except blackmamba in sites-packages-3 (done by author installation process)

                                    Nb I don't have these messages, thus....please move them at the right place

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

                                      @ihf V01.06 and outline.versions with

                                      Version V01.06
                                        - add/update calendar event at each outline file save, with
                                          - calendar = Outline
                                          - start/end date = 20220101 01:01
                                          - title = outline file name
                                          - notes = outline text
                                          nb: to be used on Apple Watch via shortcuts
                                      
                                      1 Reply Last reply Reply Quote 0
                                      • cvp
                                        cvp @ihf last edited by

                                        @ihf Please, give me some feedback about Apple Watch and Mac (Safari web page) solutions.

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

                                          @cvp The new save to calendar worked fine on my iPhone. However, I then ran it on my iPad with the same Outline and it wrote a second (modified) calendar item with same name. The Shortcut seems to pickup the older one (I presume should only be one).
                                          I’ll check out the Mac reader shortly.

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

                                            @ihf said

                                            The Shortcut seems to pickup the older one

                                            I got the same problem during some time, exactly like if the Apple Watch kept a cache of the previous calendar event notes, because there was only one event in the calendar.
                                            iCloud updating of the calendar event takes some time... Not the first time I note that.

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