A plugin for Obsidian (https://obsidian.md) that adds additional `x-callback-url` endpoints to the app for common actions — it's a clean, super-charged addition to Obsidian URI.
Currently, when note creation is attempted, and a note already exists (ex: create daily note, daily note already in place), an error is returned. One could use the optional overwrite flag to overwrite the existing note, but this is not always desirable. It would be nice to have an optional parameter that would allow the user to skip creation, i.e. to handle an existing target note not as a fail state but as a success state.
Idea
New optional if-exists parameter for note creation routes, only used in case the target note already exists. If its value is skip, the route will return a success response, but will not create a new note. If its value is overwrite, the current note will effectively be deleted, then created from scratch. (This would supersede and effectively deprecate the overwrite parameter.)
If if-exists isn't set, and the target note already exists, an error will be returned as it was before.
Currently, when note creation is attempted, and a note already exists (ex: create daily note, daily note already in place), an error is returned. One could use the optional
overwrite
flag to overwrite the existing note, but this is not always desirable. It would be nice to have an optional parameter that would allow the user to skip creation, i.e. to handle an existing target note not as a fail state but as a success state.Idea
New optional
if-exists
parameter for note creation routes, only used in case the target note already exists. If its value isskip
, the route will return a success response, but will not create a new note. If its value isoverwrite
, the current note will effectively be deleted, then created from scratch. (This would supersede and effectively deprecate theoverwrite
parameter.)If
if-exists
isn't set, and the target note already exists, an error will be returned as it was before./daily-note/create
✅ 2023-04-14/note/create
✅ 2023-04-14/daily-note/create
(incl.overwrite
parameter deprecation notice) ✅ 2023-04-14/note/create
(incl.overwrite
parameter deprecation notice) ✅ 2023-04-14ZCO-126