View Single Post
Old 06-18-2014, 03:05 PM   #797
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,884
Karma: 6120478
Join Date: Nov 2009
Device: many
Hi DiapDealer,

Yes, most definitely. I made pagemapxml a null string in Mobi7 but this approach is better.

I will make the change and release a 0.72a immediately. Hopefully the last bug!

Edited: removed KindleUnpack_v072.zip and changed it to KindleUnpack_v072a.zip in previous post


Yes, I would just leave out the apnx feature in the plugin. The apnx files generated by calibre even with the recent changes are mainly fake offsets which would just confuse the hell out of things for KindleUnpack. Also many of the apnx files in Kindle ebooks are just plain fake offsets as well. So yes, I would leave that for more advanced standalone use.

Also, one question: Is there any real limit on image size or resolution in epubs? In other words, can we simply unpack the HDImages and replace the smaller kindlegen generated images on the fly. That will give the "best" image for later use in any conversion.

If so, users can convert with an epub to epub conversion in Calibre if they need to downsample the images for their particular epub device.

Thanks,

KevinH

Quote:
Originally Posted by DiapDealer View Post
I'm still seeing a slight issue with AZW4/Print Replica in v0.72.

Line 454 (in processPrintReplica) of kindleunpack.py attempts to initiate the class OPFProcessor (mobi_opf.py) with an insufficient number of parameters. Should not OPFProcessor's 'pagemapxml' parameter be made optional?

From (mobi_opf.py line 11):
Code:
def __init__(self, files, metadata, filenames, imgnames, isNCX, mh, usedmap, pagemapxml, guidetext=False, k8resc=None):
to:
Code:
def __init__(self, files, metadata, filenames, imgnames, isNCX, mh, usedmap, pagemapxml='', guidetext=False, k8resc=None):
Other than that, I've had great luck plopping the refactored code into my plugin's framework.

I just have to figure out what to do about letting users select an apnx file from the plugin. I'm leaning toward not worrying about it at all. There's no way to store an apnx file WITH the book in calibre anyway, so I'm thinking of just leaving that as a feature they'll need to use the standalone version of KindleUnpack for. We'll see.

Last edited by KevinH; 06-18-2014 at 03:21 PM. Reason: Added Fact that v072a is now out
KevinH is offline   Reply With Quote