![]() |
#1 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 442
Karma: 2666666
Join Date: Nov 2020
Device: none
|
Question about word wise
Does anyone know what sidecarRevision, bookRevision and sidecarFormat from metadata table(https://github.com/xxyzz/WordDumb/bl...layerenasinkll) are used for? And how to get these values for a certain book?
I find out how to get acr for mobi and azw3 books but don't know where to find it in kfx books. |
![]() |
![]() |
![]() |
#2 | ||
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,066
Karma: 91577715
Join Date: Nov 2011
Location: Charlottesville, VA
Device: Kindles
|
Quote:
Quote:
One way to obtain this is to use the KFX Input calibre plugin in CLI mode. The console output from that will contain a string in the form "asset_id=CR!9PSZZDRCQX6DQDZPFDT3G8FMCE39," giving you the value. |
||
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 442
Karma: 2666666
Join Date: Nov 2020
Device: none
|
Thanks!
I tried to edit ASIN of KFX book by doing this, but nothing happened, is this the right way? Code:
from calibre_plugins.kfx_input.kfxlib import YJ_Book book = YJ_Book('book.kfx') metadata = book.get_metadata() metadata.asin = 'BBBBB' book.set_yj_metadata_to_book(metadata) Code:
if yj_metadata.asin is None: I forget to ask about srl and erl in book_metadata table: https://github.com/xxyzz/WordDumb/bl...ntitiesasinasc Last edited by xxyzz; 03-10-2021 at 03:21 AM. |
![]() |
![]() |
![]() |
#4 | |||
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,066
Karma: 91577715
Join Date: Nov 2011
Location: Charlottesville, VA
Device: Kindles
|
Quote:
Code:
book = YJ_Book("book.kfx") md = YJ_Metadata() md.asin = "B000000000" md.cde_content_type = "EBOK" book.decode_book(set_metadata=md) new_kfx_data = book.convert_to_single_kfx() with io.open("new_book.kfx", "wb") as new_file: new_file.write(new_kfx_data) Quote:
"YJ" is short for "Yellow Jersey" the Amazon code name for KFX format and related technology. Quote:
|
|||
![]() |
![]() |
![]() |
#5 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
Wasn't it Yellow Jacket (like the wasps, I assume, because it's tiny, angry and fast? ^^)?
(Not that it changes much in the grand scheme of things, and it's been entirely too long since I've looked at any of this stuff ^^). |
![]() |
![]() |
Advert | |
|
![]() |
#6 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,066
Karma: 91577715
Join Date: Nov 2011
Location: Charlottesville, VA
Device: Kindles
|
Quote:
The YJ renderer version number in Kindle firmware can be found in the file: /usr/share/yellowjersey/version.txt |
|
![]() |
![]() |
![]() |
#7 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
Ah, thanks
![]() ![]() |
![]() |
![]() |
![]() |
#8 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 442
Karma: 2666666
Join Date: Nov 2020
Device: none
|
Thanks for the help!
I still have some questions: - I'm using the following code to get acr: Code:
book = YJ_Book(book_path) book.get_metadata() return book.get_asset_id() - Why 'convert_to_single_kfx' calls 'decode_book' again? - Should I just use the first and the last test location as srl and erl or get them from header or somewhere? - I'm using regex('>[^<>]+<') to find the text between tags for MOBI and AZW3 books, it there a better way(faster and skip tags like <style>) to get the book text and their locations? - I guess kfx doesn't have a header similar to Unique-ID? - How do you know all these stuffs about Kindle? |
![]() |
![]() |
![]() |
#9 | |||
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,066
Karma: 91577715
Join Date: Nov 2011
Location: Charlottesville, VA
Device: Kindles
|
Quote:
In the future I will include the asset_id as part of the YJ_Metadata object returned by get_metadata to avoid the need to call get_asset_id. I did not intend for get_asset_id to be used by external software. It should not be necessary. I will look at the code and if it is needed I will do it inside of get_metadata. Just in case it has not been called previously. decode_book will do nothing if it is called more than once. Quote:
Quote:
That is correct. That field does not occur in KFX format. Online research and looking at what code I can find. |
|||
![]() |
![]() |
![]() |
#10 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 442
Karma: 2666666
Join Date: Nov 2020
Device: none
|
Thanks for your patience. All of these values seem to have no effect on word wise and x-ray but I think it's better to use the correct values if I can.
|
![]() |
![]() |
![]() |
#11 |
Member
![]() Posts: 19
Karma: 10
Join Date: Apr 2018
Device: none
|
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Troubleshooting Question about "Word Wise" Kindle app android | sprazer | Amazon Kindle | 1 | 08-22-2018 04:02 AM |
Word Wise for custom ebooks? | Entry20 | Kindle Formats | 1 | 03-12-2018 10:53 AM |
Word Wise not working properly? | doctorat | Amazon Kindle | 3 | 08-23-2017 03:43 AM |
Content Word wise in converted files | anshulgaba | Amazon Kindle | 1 | 11-25-2016 04:57 AM |
New Kindle Word Wise feature | Doitsu | Kindle Formats | 38 | 07-20-2015 06:40 AM |