Outliner with drag/drop reordering - part 2
@cvp boiled it down to the first few actions: https://www.icloud.com/shortcuts/ea369edfee254b138caf8dfc06394abc
That works on iPad and gives no output on Watch.
@ihf Ok, thus we have a problem...
I think I'll modify all to store the outlines in contacts in place of calendar events.
I could create a group "Outline" for contacts and add/update contacts of this group, with first name = outline title, group = outline and notes = outline content.
Of course, I have to
- create a "only once run" shortcut to copy outline from calendar 2042 events to contacts
- create a shortcut to select an outline and display its content (modify actual outlines shortcut)
- modify outline.py to add/update a contact with this info
You should manually perhaps delete the 2042 event when all is ok
Your opinion please or any other idea to improve that.
I'm going away in vacation next weekend, thus I would try to do this job still this week.
I'm afraid I could have already tried this solution in the past and met problems and forgotten...
@cvp Before you do that, I am going to try unpairing and re-pairing the Watch. It will take a little while.
@cvp unpaired and re-paired watch. No change. I can't think of anything else to try, so moving to contacts seems a good idea. It has the subsidiary benefit of not ceasing to work after 20 years :-)
It has the subsidiary benefit of not ceasing to work after 20 years
Cool, thus I can die without any stress
Then, I'LL begin. Agree that contacts will be
First name = outline title
Last name = Outline (needed to associate them to group Outline)
Group = Outline
@ihf Thanks, I'LL think first about sequence of operations...
What is sure is that I'LL not program something automatic to delete unused 2042 events.
If you only have 10 such outlines events, you can delete them manually and easily
First problem: I've
- created 3 contacts belonging to same group "Outline" with first name = outline title and last name = outline content
- created a shortcut to display first names of all contacts of "Outline" group and allow to select one and display its content
Shortcut ok on iPad but takes a very long time on Apple Watch... I'll debug
Reason: on Watch, no filter, it extracts all contacts, on iPad only contacts of right group 😭
It seems that shortcuts on Apple Watch do not work exactly like on iDevice
Ok, group does not seem to be accessible on Apple Watch. If my shortcut filters on last name = "Outline", it works even on Apple Watch, thus we forget this group,
@cvp Sure, I don't know anyone by that name.
ihf last edited by ihf
@cvp A better way would be to use DataJar but have to figure out how to get the outline from the script to there. I just realized you solved this (DataJar) 6 months ago. :-)
@ihf I don't remember what I did, but it is normal for my old age. Tell me
@cvp I found the thread when I searched the web for Pythonista and DataJar. It was about six months ago and I think you knew how to get the data into DataJar using the Shortcuts module, however we decided that the calendar was a better approach.
@ihf ok, and now, do we agree that contacts is the best way?
ihf last edited by ihf
@cvp The only problem I see is if I (or anyone using the script) shares their contacts as part of their connection to some other service. It may not be desirable to share the content of these outlines. I tend to avoid sharing contacts but it occurred to me that having the outline information in there could conceivably be problematic. DataJar would not have that privacy consideration.
@ihf Wow. Not thought about this privacy. Found the posts but problem was to run a shortcut at each outline update. Reason why we did prefer calendar event. Remember that we do this process only for Apple Watch...
@cvp Data Jar lets you store any files and quickly retrieve them in Shortcuts. It is a very useful app.
@ihf ok, I understand but that will say update this iCloud file at each outline update
And did you try to read a DataJar on Watch?
@cvp yes, I use Data Jar to retrieve images, sound and text files all to the Watch.
@cvp I don’t know if this is possible, but if Pythonista can write the data to the Data Jar directory in iCloud then it will be accessible to a shortcut using Data Jar.
@ihf Ok, do you want we try to go in this direction? If yes, perhaps not before my vacations and you will have to describe your request. Only one file? Multiple records, one per outline? Key=outline title, data=outline file?
but if Pythonista can write the data to the Data Jar directory in iCloud
We will fall one more time with iCloud problems when updating an iCloud file, remember multiple versions with a number in the file. I guess it is better to always use only one file which should be a big dictionary of your outlines .