02-22-2022, 06:59 AM | #1 |
Junior Member
Posts: 7
Karma: 10
Join Date: Jan 2022
Device: Kindle Paperwhite 5
|
Kindle locations
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: 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. Last edited by olof-ynwa; 02-22-2022 at 07:03 AM. Reason: Clarification |
02-22-2022, 10:29 AM | #2 |
the rook, bossing Never.
Posts: 11,709
Karma: 87663463
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
|
Kindle is a waste of time for annotations for proof reading & editing. So I changed to using a Kobo, where it's a solved thing. Collections, Series, covers & reading back annotations per book all work perfectly with all Kobo models in free Calibre (Mac, Windows, Linux).
Having even some of those working on a PW3 needs Amazon, and even then it's poor. |
02-22-2022, 10:43 AM | #3 | |
Grand Sorcerer
Posts: 6,572
Karma: 84812983
Join Date: Nov 2011
Location: Tampa Bay, Florida
Device: Kindles
|
A location is a reference an approximate location in a book. Each location represents 150 bytes of raw HTML in MOBI format. The other Kindle formats, such as KF8 (azw3) and KFX, contain a mapping table that shows where each location starts within their content. This is done so that that the same location number will refer to the same snippet of content regardless of the particular Kindle format in which the book was delivered.
(Side note: Kindle books created by calibre in AZW3 format lack the table needed to map location numbers to a corresponding MOBI.) Quote:
KindleUnpack can unpack books in various ways. One of those provides the raw HTML which relates to locations. Yes, but there is another possible way to approach the problem. Besides the inexact "location" numbers Kindle books also use "position" numbers to refer to an exact point within the content of a book. Those are used to refer to content in the internal representation of notes and annotations. Some MobileRead threads with more information on this are: azw3r highlight and note extraction info KRDS - A parser for Kindle reader data store files (Added disclaimer: Obtaining the content corresponding to positions will not be possible for books in KFX format, the most common format for modern Kindles, due to unbreakable DRM.) Last edited by jhowell; 02-22-2022 at 08:54 PM. Reason: typo |
|
02-22-2022, 12:41 PM | #4 |
Junior Member
Posts: 7
Karma: 10
Join Date: Jan 2022
Device: Kindle Paperwhite 5
|
Wow, seems like KRDS is exactly what I need Thank you so much.
|
Tags |
azw3, kindle, locations, mobi |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to go to a page on Kindle??? Locations are annoying. | pashlit | Amazon Kindle | 86 | 12-14-2011 01:25 PM |
Storage locations for ADE and Kindle for PC | Vertigo | Reading and Management | 10 | 06-19-2011 09:44 PM |
Problem: kindle stopped showing locations | Raheldm | Amazon Kindle | 37 | 03-10-2011 10:20 PM |
Locations line not showing on Kindle | Lacour | Amazon Kindle | 5 | 03-05-2011 12:28 PM |
LOCATIONS ON KINDLE FOR PCHow | ijbrewst | Amazon Kindle | 0 | 01-19-2011 01:13 AM |