View Single Post
Old 01-30-2015, 05:56 AM   #128
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
I thought of a test. I made an annotation in the Kindle app on my iPad. Then I opened Kindle for PC. The annotation was there.

When I looked in the directory the books are in, there was an mbp. The (reformatted) contents are:

Code:
{
"md5":"1456041f37626390ee733f102fcab643",
"payload": {
	"guid":"CR!VKB2NABKD94EBCKQ2R2DAAFQ4D8N:DDC1AF5F",
	"key":"B008ZG9KMA",
	"acr":"CR!VKB2NABKD94EBCKQ2R2DAAFQ4D8N",
	"type":"EBOK",
	"records": [
		{
			"lastModificationTime":"2015-01-30 03:41:09.0",
			"startPosition":"5853",
			"type":"kindle.note",
			"text":"This is a test!",
			"endPosition":"5853",
			"creationTime":"2015-01-30 03:41:09.0"
		},
		{
			"location":"5160",
			"type":"kindle.lpr",
			"creationTime":"2015-01-30 03:41:52.0"
		},
		{
			"lastModificationTime":"2015-01-30 03:40:39.0",
			"startPosition":"5674",
			"type":"kindle.highlight",
			"endPosition":"5853",
			"creationTime":"2015-01-30 03:40:39.0"
		}
	]
	}
}
That is clear and easy to handle. The issue is that it doesn't include the highlighted text. The positions are there. That probably makes it possible to extract the text, but I have no idea how to do that.

I don't know if this is what is encoded in the file eschwartz supplied. It probably is, unless there is a different format file for the different book formats. And suspect that the use of clear text might be dependent on something else. I added an annotation to another book, and it was not in this format. And a third one was. I think the DRM state of the book changes the annotations file. Whether the Kindle device follows the same rules, I don't know.

Right now, I won't be doing anything about this. If someone wants to write some code, I'll be happy to discuss it. And very happy to include it in the plugin. Especially if it works better than what we currently have.
davidfor is offline   Reply With Quote