I'm currently working on a annotations parser that parses the kindle annotations and then pairs them into note-highlight pairs. (Everytime a note is created in your kindle a highlight is created at the same place). The note is then parsed into list of commands that govern if the highlight should be changed (adding text with metadata to it, search and replace, basic formatting), and where it should be written (add to line/header in markdown file) etcetera. It works fine but I want to implement some extra functionality.
I want to be able to implement a command that allows the user to extract specific images, or tables from an unpacked version of the kindle file.
Whenever a image is highlighted in the kindle, the content of the saved highlight is just an empty string as such:
Note highlight pair example from MyClippings.txt:
Highlight:
Associated note containing commands:
The x image command above says: this is an image, Extract it from the html of the unpacked version of this book by using information about the location (preferable) or page. Replace the actual highlight content with image content (markdown image embed in this case) and copy the image source file to markdown attachements folder.
The actual questions
Is it possible to do this? How does locations in kindle actually work? Is it possible to find the html associated with some location. If not, is it atleast possible to do by page?
I experimented a bit and I couldn't find any patterns between kindle locations and the html of the unpacked version.. Does the unpacking of the book actually change the html?
Thank you in advance.
I want to be able to implement a command that allows the user to extract specific images, or tables from an unpacked version of the kindle file.
Whenever a image is highlighted in the kindle, the content of the saved highlight is just an empty string as such:
Note highlight pair example from MyClippings.txt:
Highlight:
Code:
==========
Nils Holgerssons underbara resa genom Sverige. 1 (Selma Lagerlöf)
- Your Highlight on page 29 | Location 431-432 | Added on Monday, January 31, 2022 12:28:12 PM
Code:
==========
Nils Holgerssons underbara resa genom Sverige. 1 (Selma Lagerlöf)
- Your Note on page 29 | Location 432 | Added on Monday, January 31, 2022 12:28:12 PM
x image
The actual questions
Is it possible to do this? How does locations in kindle actually work? Is it possible to find the html associated with some location. If not, is it atleast possible to do by page?
I experimented a bit and I couldn't find any patterns between kindle locations and the html of the unpacked version.. Does the unpacking of the book actually change the html?
Thank you in advance.