Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support incremental updates #4

Open
simonw opened this issue Mar 9, 2023 · 2 comments
Open

Support incremental updates #4

simonw opened this issue Mar 9, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@simonw
Copy link
Collaborator

simonw commented Mar 9, 2023

Running this script can take several hours against a large notes database.

Would be neat if it could run against just the notes that have been modified since it last ran. Could pull the max updated date and then keep on looping until it finds one modified before then.

Problem is I don't actually know what order it iterates over the notes in.

@simonw simonw added the enhancement New feature or request label Mar 9, 2023
@simonw
Copy link
Collaborator Author

simonw commented Mar 9, 2023

It looks like the iteration order is most-recently-modified-first - I tried editing a note a bit further back in my notes app and it was the first one output by apple-notes-to-sqlite --dump.

@simonw
Copy link
Collaborator Author

simonw commented Mar 9, 2023

In terms of the UI: I'm tempted to say that the default behaviour is for it to run until it sees a note that it already knows about AND that has matching update/created dates, and then stop.

You can do a full import again ignoring that logic with apple-notes-to-sqlite notes.db --full.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant