I want to update note properties when an event happens.
For example, I want to track how many times I’ve modified a note over the last year, month, or week (counted daily). So, I need to set and update ‘mcounter’ and ‘mdates’ properties each time I make a change.
How can I accomplish it in Obsidian?
I can write simple JS code. I don’t know how to access Obsidian data and execute the code when I would like it to run.
I tried Dataview, Templatr and QuickAdd plugins. They cover a lot of my use cases. But, unless I miss sth, they won’t work in the case specified above.
this can be done with a workaround: set up git and add to the note’s frontmatter the url of the note as it is in Github,
e.g. github.com/hanna/hannasvault/blob/12f71176e7f0e3138e483799e57d853e1bed8a4e/somenotename.md
if you install the surfing plugin you can access the file url within obsidian as well and see the history of the file
there is a learning curve with git of course but if the script is not going to be done by anyone, it will have done something good in the meantime – for example, you’ll learn how to sync your notes…