obsidian-full-calendar
obsidian-full-calendar copied to clipboard
Ability to create multiple events with same title and start date
When I create a new appointment with the same title as an existing one, the existing appointment will be overwritten.
In obsidian you can move a file to a different folder with the same name. Without further inquiry obsidian will put a number at the end of the file. That might be a suitable solution for this plugin.
Now, note titles are {DATE} {TITLE}.md
and so name collisions are much less frequent, but they are still possible, and this commit adds helpful error messages and better error handling for this case.
I still plan to fix this, but am trying to think of an elegant way to keep file names in sync with event titles while allowing for title collisions. I'll keep this issue open to track that, but will modify the title slightly to reflect the progress made so far.
Also changing from a bug to an enhancement since this is a covered edge case now and won't crash the plugin.
I'm having trouble following the TypeScript, but this enhancement will likely be somewhere in NoteEvent.ts with ${basenameFromEvent(data)}
. If I was more familiar with the code, I'd offer you a code blob suggestion. Great tool. Keep up the awesome work.
The main issue here is in finding a way to uniquely identify events in a filename that also makes logical sense. I'm very open to suggestions, but I can't think of something more logical than {date} {title}
. Further disambiguation can happen with {date} {startTime}-{endTime} {title}
, but I don't know if that's too long or verbose.
I'd reuse what you have in place for tasks and non-recurring events, {date} {title}
. The same behavior happens when a recurring task is dragged or turned into a task. If a single event was turned into recurring, it would be a matter of wrapping the (Every ...) {date} {title})
-- keep it simple.