Outliner with drag/drop reordering - part 2
@ccc thanks for the advice
Sorry to report that it wrote 2 events for the same outline. It never erased the one from the iPad when it wrote the one from the iPhone.
Annoying. That will say that the eventid of the "created on iPad" event is not reachable on iPhone.
I did not test on two devices because my outlines folder is local on my iPad. I need to change that for next tests. Sorry for you, but that will not be immediate.
@ihf The problem comes from the fact that eventIdentifier is not the same on different devices, and I thought it was shared on devices. My mistake, thus I have to search for a different solution. Sorry for you. but, I'll do it.
I think that I'll (try to) identify the event by its title and if I need to update it, even on another device, I'll search the event with the same title (at 20220101 01:01 in Outline calendar ) If not found, I create it, else I update it.
Version V01.08 - correction of bug "eventIdentifier not shared cross devices for outline event"
Nb: - if you rename the outline file, renaming the event title is not yet supported
- this problem of eventIdentifier not shared on different devices has the same consequences for events for due dates (remember problems we got) but I'm not ready to correct this part because it has a lot of implications. Sorry.
you have to manually remove events and install the same version on all devices before testing
@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