Getting text changed across vault since last sync?

Let’s say I synced on afternoon yesterday and now it’s today, I want to get all the content that’s changed since then. Think there’s a lot of applications for this (i.e. passing to an AI for automatically generating reports based on all the new notes you’ve taken)

One idea I had was to have an editor onChange listener to track all these text and just build up bottom up all your changes, but I think this would be too data-intensive though I guess if it gets deleted daily, it’s not too bad

Does Obsidian even track history for files itself? I don’t think so right?

Okay, the way I’m currently doing this is a lazier approach to what I had initially proposed.

So instead of the way of getting all the changed texts, I’m just storing on file modify of the vault vault.on(‘modify’) and then when I sync it just to get all the files changed since then and just read in all their contents.

The problem is I’m not able to get the difference in texts for those files and the only wa y I can think around this is to do editor on-change to build up the changes in text iteratively or on file modify, to store cached versions, so I’m a bit confused on this still

The other problem you’ll need to solve with this approach is that files could change even when the app is not running and not firing vault.on("modify") events.

This sounds like something that git would solve much better. I’m not sure what you want to achieve exactly with your plugin, but if it’s desktop-only, then your plugin could just delegate everything to git.

That’s not a bad idea, I suppose I have to figure out how to retrieve it from Git which should be easy…