Outliner with drag/drop reordering - part 2
@ccc thanks for the advice
@ihf In this case, unfortunately, a shortcut running on an Apple Watch will not access the outlines.
But if you decide to use iCloudDrive/Shortcuts/Oulines as base folder for your outlines, an Apple Watch shortcut could be done for appending a text in an outline, without disturbing the other tasks (I think, not tested)
@ihf I have written a shortcut and its included Pyto code to:
- display a list of outlines in iCloudDrive/Shortcuts/Outlines folder
- ask the user to select one
- ask the user the text to add at end of outline
- add a row to the outline
- save the outline with same name
I keep the same name because the script would not be authorized to modify the outline.prm file with an eventual modified file name because this .prm file is local to Pythonista folder.
Thé script does not update the 2022 event's notes with the new content (used by Apple Watch shortcut to display an outline).
As is, the shortcut works on my iPad, but not on my Apple Watch, without any explanation as usual, during execution of Pyto code. I guess that something of the Pyto code is not authorized in the Watch.
Édit: on my watch, I get an error "impossible to listen to the last recorded vocal message", very helpful 😂
@ihf I don't understand how but the last action of my shortcut was "listen to last recorded vocal message". I guess I added it but not voluntarily.
OF COURSE, I removed this action but the shortcut does not work yet...on my watch
On my watch, the action "get folder content" returns nothing in place of the list of files as it does on iPad.
@ihf I try, in a shortcut on my Apple Watch, to get the list of files of a iCloud shortcuts sub-folder, and, as said previously, action "get folder content" does not work. I just tried an action "run Pyto code" with os.listdir() but it also returns None... on the Watch but is ok on my iPad.
If I want to write a shortcut/Pyto_code, I need to get the full file name, it is annoying.
@ihf I have a little shortcut with an included Pyto code, with these actions:
- Set fixed file name of outline file to be appended
- Ask text to append
- Run Pyto code which will append text to specified outline, without
- changing file name
- updating .prm with last updated file
- changing 2022 event's notes with full file
Not sure this could help you as I can't find myself the full file name because Apple Watch is not authorized to get a list of files of a sub-folder even in shortcuts folder.
If you want to try, this is the shortcut but you have to set manually the full file name.
@ihf I don't know if you want to try this shortcut.
If yes, create subfolder Outlines in ICloudDrive/Shortcuts folder and copy there an outline file.
Type its name (without .outline) in shortcut first text action.
And run shortcut on your watch.
After, you can always check the modified outline in outline.py by setting current path to this path and open the outline.
And please give some feedback
@cvp I haven’t tested the shortcut yet. I just got a new iPhone 13 Pro and have been busy trying to get everything working from my old iPhone. I’ve noticed a problem when running Pythonista and the outline script. Touching the Close X in the left corner or the menu item is hit or miss. I’m not sure you could do anything about it as it may just be a problem with Pythonista on this new phone but I thought I’d let you know.
Touching the Close X in the left corner or the menu item is hit or miss
Not understood, sorry. I'll wait for more info.
@cvp On the iPhone 13, I have found that when I try to touch one of the menu items (e.g., the X to terminate the script), it does not recognize the touch. After several tries, I can get it to work but it is as if the menu bar is too high or the coordinates for the touch are not right for this phone.
@ihf Sorry but I sincerely don'T know what I could do. If the button is visible, how is it possible that the touch area could not be correct.
@cvp I agree but there it is.
@cvp the outline name is actually in the area at the top that ios places its icons for networks and the time and the battery. It could be an ios bug on the iphone 13. This was never an issue on the old iphone.
@ihf I guess that I'm responsible for the problem. The script displays outline name and undo button at 10 pixels from the screen top. And that is obviously not compatible with a device having a notch. I don't have this kind of device (only iPad Air 4 and iPhone SE2) thus I've never remarked a problem.
As you got an iPhone 13Pro as Xmas present, I'll have to quickly develop a new version supporting it 😂.
I'll foresee to not display anything in the safe area of the iDevice. You'll see that even the TableView will be limited just above the horizontal line at bottom.
But Pythonista fullscreen overrides the whole screen.
Wait until my evening.
@cvp I guess all the complaints about the notch were related to more than just aesthetics.
Version V01.32 - support all versions of iDevices, taking in account their "Safe Area" to display buttons and items
Hoping feed-back after tests with all your devices. If it works (even when turning your device), it could be my Xmas present.
My last problem has been turning the device when dates are displayed because the TableView has also been moved down to display date title.
@cvp That works perfectly on my iPhone 13. Best wishes for a Happy and Healthy (covid-free) 2022! And thank you so much for all of your work on outline!
@ihf thank you for your good wishes. In my turn, I wish you that 2022 will be wonderful for you and your loved ones. No thanks for outline, you are a very appreciated customer 😂
I haven’t tested the shortcut yet
Could you try?
@cvp After moving an outline file into the correct place and putting the name in the shortcut, I run the shortcut and it runs without error but I don’t see anything being added to the file. I’m not sure it’s actually running the Pyto script. I will play around some more