View Single Post
Old 07-01-2014, 09:16 AM   #853
tkeo
Connoisseur
tkeo began at the beginning.
 
Posts: 94
Karma: 10
Join Date: Feb 2014
Location: Japan
Device: Kindle PaperWhite, Kobo Aura HD
Hi Kevin,

Quote:
Originally Posted by KevinH View Post
If you have an RESCxxxxx.dat file that is very complicated, I would love to have it as a testcase. I won't need the entire book just the RESCxxxxx.dat file. Thanks.
I attach a RESC.dat. Please test it.

Quote:
My idea is that we change the parseRESC code to use a loop with yield so we can then create our own RESC iterator. Then using one loop in k8resc we check each tag name sequentially that exists in the RESC, and process the meta data we need building up an epub2 or 3 version on the fly, find the cover info, get the spine attributes, and grab the skelids and any properties associated with them and store all of this away in the k8resc object for later retrieval.

That should handle everything we need correct?
I think so perphaps. I will consider more carefully later.

Could you use OrderedDict in order to keep attribues order?
It will make easier to check bugs by comparing reconstructed opfs between KindleUnpack versions using diff.

Quote:
The mobi7 is just a much simpler subset of the mobi8 epub2 one. If you want to keep it separate then please do. But I thought you said that splitting out epub3 from epub2 was more important to create fewer ifs and simpler/cleaner code?

I am willing to do whatever you feel is best in the opf code as long as it reduces redundancies and creates simpler code overall.
I think I meant to said splitting out mobi7 from epub2.

I will reconsider this.
But I have forgotten about auto detection of epub version at all.
We might come to one opf generation function which calls sub-functions in the end.

Thanks,
Attached Files
File Type: txt RESC00011.dat.txt (2.0 KB, 278 views)

Last edited by tkeo; 07-01-2014 at 09:29 AM. Reason: Failed to attach a file.
tkeo is offline   Reply With Quote