View Single Post
Old 09-12-2011, 12:14 PM   #158
fandrieu
Member
fandrieu began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Sep 2011
Device: kindle 3
here it is

Thank you very much for all your quick replies !

I just downloaded v31 from the link you provided and finished retro-fitting the modifications I had made to v23.

I'll try to explain why / how I did those changes later but first, as code speaks louder than words, here's the file.

....

Just a few words:
* I just finished merging, it's not tested

* The NCX part is really a proof of concept, it does however produce an acceptable output on my test files with flat NCX.
It consists of:
- a code block with 3 methods just before unpackBook
- a main code block in unpackBook, enclosed by "#TEST NCX"
- a small mod to the OPF code, to add a ref to the NCX

* Other than there's some "empirical" changes I made while testing some files:
- FILEPOS_ON_ALL_ANCHORS: an option to use an alternate code that processes all empty anchors instead of focusing on existing links...
- replaced a " " by "\s+" in the "Insert hrefs into html" rx...
- alternate way to set the html file encoding

EDIT: sorry, the file i uploaded contained several fatal errors i failed to spot.
EDIT: the new file should work at least with calibre-generated mobis...

EDIT2: added a text file describing what I gathered of the NCX equivalent in MOBI

EDIT3: basic fixes to the code...
Attached Files
File Type: txt mobiunpack_ncx.txt (2.3 KB, 315 views)
File Type: zip mobiunpack_31_fand_EDIT3.zip (15.8 KB, 291 views)

Last edited by fandrieu; 09-12-2011 at 06:03 PM.
fandrieu is offline   Reply With Quote