-
Notifications
You must be signed in to change notification settings - Fork 9
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
feat: keep existing highlights and notes, and add sort by chapter progress #107
Conversation
My Typos 😩 🙈 This is a nice solution, thanks for the PR! A few questions:
Based on the above, I suggest to create 2 markers, and inner marker and an outer marker:
This way
wdyt? |
Just a small update. IDs are kept across edits, so I need to consider that too. My initial thought is that we use the modified date to track modifications, and creation date to enable the sorting by date created. This will need a larger refactoring, but I have some ideas on how to do it. I hope I'll have an implementation ready some time in the coming month. 👍 |
Sorry about the slow progress. Between my job and family obligations, I haven't had the time or energy to work on this yet. I just wanted to give an update, so you don't think I've abandoned it. 🙄 Hopefully things will calm a bit down towards the summer, so I can get it done. 👍 |
@rsletta anything change re your availability? No rush, just checking in. |
I so sorry for not working faster. There has been no time to sit down and get back into this yet, even though I hoped I would be able to in my summer holiday. I have to prioritize family time first, and then it hasn't been much left. I can step away if I'm blocking progress, but I do intend to finish what I've started, if there isn't a rush. Sorry for the slow progress. 😕 |
FYI @rsletta: #266 (comment) |
Thank's for the heads up. I'm really sorry for dropping the ball on this, not delivering as promised. |
This allowes to add notes to the highlight, without overwriting the notes and keeping the higlight up to date.
|
This PR adds support for keeping existing highlights and notes, and a new setting to sort highlights by chapter progress, rather than annotation creation date.
The implementation uses a simple approach using the existing files, rather than creating unnecessary complexity by introducing some sort of state management. It uses the bookmark id from the Kobo db as highlight markers. On transformation to markdown, the plugin checks to see if the highlight already exist, and if it does that, it injects the existing markdown, rather than the new. By using the bookmark id in the highlight marker, we are able to handle them as separate blocks. Using comments as highlight markers makes them invisible in read mode.
Tests are refactored to include the highlight markers, and a new test is introduced to test handling of existing highlights.
README is updated with information regarding the changes.
Fixes #91