Quote:
Originally Posted by xxyzz
I'm using the following code to get acr:
Code:
book = YJ_Book(book_path)
book.get_metadata()
return book.get_asset_id()
|
That looks like that will work.
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.
Quote:
Originally Posted by xxyzz
Do I need to call 'book.final_actions() to clear temp files?
|
It should not be necessary. I will look at the code and if it is needed I will do it inside of get_metadata.
Quote:
Originally Posted by xxyzz
Why 'convert_to_single_kfx' calls 'decode_book' again?
|
Just in case it has not been called previously. decode_book will do nothing if it is called more than once.
Quote:
Originally Posted by xxyzz
Should I just use the first and the last test location as srl and erl or get them from header or somewhere?
|
I don't know why the XRAY file contains those fields. You may need to experiment to find out what values will work.
Quote:
Originally Posted by xxyzz
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?
|
A regex sounds like a good idea to me. Perhaps someone else will have another suggestion.
Quote:
Originally Posted by xxyzz
I guess kfx doesn't have a header similar to Unique-ID?
|
That is correct. That field does not occur in KFX format.
Quote:
Originally Posted by xxyzz
How do you know all these stuffs about Kindle?
|
Online research and looking at what code I can find.