View Single Post
Old 12-18-2021, 11:16 AM   #228
jhowell
Grand Sorcerer
jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.
 
jhowell's Avatar
 
Posts: 7,109
Karma: 92190133
Join Date: Nov 2011
Location: Charlottesville, VA
Device: Kindles
Quote:
Originally Posted by xxyzz View Post
For KFX books, I'll need jhowell's help again. The X-Ray data for KFX looks like this:
Code:
sqlite> SELECT * FROM excerpt WHERE image NOT NULL;
+-----+---------+--------+-------+------------------+---------+
| id  |  start  | length | image | related_entities |  goto   |
+-----+---------+--------+-------+------------------+---------+
| 576 | 1       | 0      | e6    |                  | 1       |
| 577 | 2179585 | 71     | e2GX  |                  | 2179583 |
| 578 | 2179667 | 57     | e2H8  |                  | 2179665 |
It never occurred to me that images would be relevant to the X-Ray feature. I would be happy to help.

In that table the image field has values starting with "e". Those are identifiers for KFX resources.

The code I wrote to extract text and positions from KFX files currently handles only text. I can enhance that to also include the resource names and positions for images. Each image in KFX occupies one "position" within the book, the same as a single character.

If you need to access the actual image content then I can also include the mapping from resource name to image location. That is the filename of the image within the unpacked book. (You can unpack KFX using a different option of the KFX Input plugin.)

Is there anything else you might need?
jhowell is offline   Reply With Quote