Outliner with drag/drop reordering - part 2
@ccc thanks for the advice
@cvp I may not be understanding this correctly but could you just put a unique identifier in the outline file and in the event and use that?
@ihf I could, but I would have to scan all events of the day to find the right one. That is what I hoped with the eventIdentifier field of the event, without knowing that this id was not the same on all devices, thus not unique. I use now the outline file name which is unique by definiTion.
I had used the identifier because it is the key of the calendar, you have a method to get the event from this id. But anyway, that should work now, at least for this outline event for the Apple Watch.
could you just put a unique identifier in the outline file and in the event and use that?
Do you want that I manage an own unique field, like this:
- when I create a new outline event, I store in location (unique free field in a calendar event) a string equal to date time now, so we would be sure it's unique because you would not run the script exactly at the same time on two different devices.
- I store this value also in the outline file it-self
- when I update an outline, I will scan calendar events in calendar "Outline" with start date = 20220101 01:01 to find the same unique field as this one stored in the file, so I could update the notes field
@cvp I don't have any preference as to how to prevent duplicate events. I would go with whatever you think is most efficient in the script.
By the way, would it be possible for the script to check for updates automatically (or as a menu item?). I have 3 devices I am using with Outline and on each one I am updating Outline.py as well as outline.versions to be sure that any problems that might arise are using the latest versions. Of course, this assume that you will continue to be interested in enhancing this incredibly useful program. (Also, having the outlines on the Apple Watch has proved very useful!)
Version V01.09 - check and ask to automatically install new version if available
From this version, at start, the program will:
checkif a new version is available on GitHub (needs internet )
- if yes, warn the user and ask him if he wants its automatic installation
- if yes,
installautomatically the new .versions and .py files in folder of running script
- warn the user to restart the program (this is not automatic, let's not make the user lazy 😂)
Not only checking as requested but also installing...
Not yet testable as is, but as soon you tell me that you have installed it on your devices, I'll create a dummy new version, without any modification, only for testing this one.
Or a version which writes event notes with emoji for checkbox. If you like it, tell me, and you can even decide which emojis you want for checked and unchecked.
@cvp That looks great. Unrelated: I might have imagined it but did you once ask if it would be useful to permit an outline to have text, for example as a header, that was not part of the numbered outline? If so, (and assuming it is not already there and I don’t realize it), it would be a nice addition.
@ihf please warn me if you have installed this version, so I prepare a next one for testing the automatic install
text, for example as a header, that was not part of the numbered outline
@cvp if I turn that option off it turns itself right back on if I go back to it
@ihf you have to turn it off AND select a type, even if it is the same (ex: alphanumeric)
@cvp OK, I gather that once you turn it off you can’t turn it back on for an outline
@ihf this switch forces that all outlines of first level are without the outline number.
If you want to use it as a title, use only once. Do you want something else?
@cvp perhaps I am not using this as you intended. There were 2 use cases I was envisioning. One was to have a title (or whatever introductory text) followed by the outline. As far as I can see, the way to do this now is to turn off the 1st level has outline and then the 2nd level and beyond is the outline and 1st level is title. I’m not sure what you mean when you said “use only once”. If I turn off that option and trun it back on the title will be part of the outline. (Sorry if I am being dense about this). The second use case was to have explanatory text in other places in the outline (not just the title at the top). Again, the way I would do this now is to turn off the option and use the 1st level for the non-numbered text and use the lower levels for the outline. Is this how you imagined it, or am I missing something?
I know that undo/redo is not working and it is on your list, but once it is working again, would it be able to reverse the use of the 1st level is outline option?
The second use case was to have explanatory text in other places in the outline (not just the title at the top)
used only once
If only at first row, it becomes a title.
would it be able to reverse the use of the 1st level is outline option?
You can always reset the flag on and select the same format
once it is working again
Anyway, if you want something else as title, feel free to describe your request
And please, tell me when you have installed the V01.09 so I can post a V01.10 to test the automatic install.
@cvp v1.09 is installed.
Version V01.10 - outline text in event notes for Apple Watch will contain emoji for (un)checkbox
New version should be automatically checked, confirmed, installed by V01.09
@cvp with regard to the checkboxes on the watch. What I am seeing is an unchecked box to the left of every line in the outline. I may have misunderstood but I imagined that checked or unchecked boxes would appear next to lines with a checkbox in the outline.
Édit: only after an update of the outline with the new V01.10 of course
@cvp I think I see the problem. I was using an outline that has checkboxes on some lines , but not all. It also had the 1st line has outline turned off. It appears that the event notes have a checkbox whether or not it is in the outline.
@ihf you may have check box on some lines and not on other ones. But I agree I don't use the switch off/on about 1st level