View Single Post
Old 06-14-2014, 01:50 PM   #775
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,893
Karma: 6120478
Join Date: Nov 2009
Device: many
Debug Tool: decode_apnx.py.zip

Also here is a quick and dirty python script to decode apnx files to return page names and offsets into the assembled text file (not the raw markup language file). It's command line parsing is not full unicode safe (yet). It is merely meant to demonstrate how to decode the apnx file when it is has different page numbering schemes.

Not very useful without the assembled_text.dat file but KindleUnpack's mobi_k8proc.py can be easily modified to generate that file.

NOTE: this code was thrown together very quickly to show proof of concept. It really really needs to be cleaned up before being used for any production purposes.

Hope this helps,

KevinH
Attached Files
File Type: zip decode_apnx.py.zip (1.6 KB, 209 views)

Last edited by KevinH; 06-14-2014 at 02:21 PM. Reason: added caveat about how ugly the code is
KevinH is online now   Reply With Quote