I bought an Amazon Kindle last year and absolutely loved it; I read more tech books last year than I did in my life.
I sent the some of the books to my Kindle using Amazon’s Send To Kindle app, and others using my laptop with Calibre.
Send To Kindle acts like a proxy that you send the books to, then it converts the books to Amazon’s proprietary format, and saves it to your Kindle account so that you can view the books (and their highlights) on other devices.
Books sent via your laptop don’t, they’re just a local copy on your Kindle.
I usually leave the WiFi off of my Kindle to save battery.
One day I enabled it to receive a new Kindle update, and found that all of the books sent using my laptop were deleted, while books sent using Sent To Kindle weren’t.
Apparently this is an issue that also happened to other people too.
I don’t whether that’s an unitended bug, or that’s a deliberate action by Amazon to force people to use their service.
Since I lost several books and hundreds of highlights and notes, I decided to resend all those books using Send To Kindle so that they don’t get deleted again.
Then I decided I won’t, and deleted all of those books and resent them again using my laptop, and vowed to never send another book using Send To Kindle again.
I take local backups of my Kindle and save them on my laptop.
Anyway, when I extracted the Clippings.txt file (which is like a log of all highlights and notes you take) using Calibre, I found out still contained all of the previous clippings I had taken.
Its format is very simple. Here’s an example.
1
2
3
4
5
6
7
8
9
Martin Kleppmann - Designing Data-Intensive Applications_ The Big Ideas Behind Reliable, Scalable, and Maintainable Systems-O’Reilly Media (2017) (Kleppmann, Martin)
- Your Highlight on Location 5675-5676 | Added on Thursday, July 20, 2023 1:31:37 PM
The only safe way of using a database with LWW is to ensure that a key is only written once and thereafter treated as immutable,
==========
Kubernetes in Action (Marko Luksa)
- Your Highlight on page 148 | Location 2257-2260 | Added on Sunday, October 22, 2023 6:35:40 PM
Containers are designed to run only a single process per container (unless the process itself spawns child processes). If you run multiple unrelated processes in a single container, it is your responsibility to keep all those processes running, manage their logs, and so on. For example, you’d have to include a mechanism for automatically restarting individual processes if they crash.
So I wrote a Python script that parses it and extracts it into a list of notes and grouped them by book, however, viewing them in a pretty way was a problem, so I decided to rewrite the script in JavaScript and make a web page that has an input field for the clippings and display them in a pretty way.
I added extra functionalit like selecting books and ordering their clippings by their page, location, and date in ascending or descending order, and exporting them as Plaintext, Markdown, and JSON, and interactivity using Alpine.js.
I’m quite happy with the result. Here’s how it looks like.
You can find the source code here: https://gitlab.com/adhamsalama/kindle-clippings-extractor