View Single Post
Old 06-18-2014, 08:43 AM   #787
tkeo
Connoisseur
tkeo began at the beginning.
 
Posts: 94
Karma: 10
Join Date: Feb 2014
Location: Japan
Device: Kindle PaperWhite, Kobo Aura HD
About refactoring

Kevin,

I would like to ask you for a modification about refactoring.

Could you allow me
to remove the imgnames pamareter and change the return value from imgnames to imginfo whose structure is [dir, imgname, type, secno, dataoffset, data(=None)], to functions listed below, and appending it in process_all_mobi_headers(),
or
to change the parameter from imgnames to imglist(= list of the imginfo)?

The list of functions to modify:
processSRCS(), processPAGE(), processCMET(), processFONT(), pocessCRES(), processCONT(), processkind(), processRESC(), processImage().

Because I am considering to move all calling of write() except for DUMP into process_all_mobi_headers() in order to make easier to understand and writing files to mobi8 folder directly instead of copying files from mobi7 folder, in addition, creating epub files from the imglist.
I think it will make easy to support HD images. Since to make the epub for the HD images, recreating XHTML files or renaming the file names of the HD images are required.
I attach the newest preview version I have, as a reference.

Thanks,
Attached Files
File Type: zip KindleUnpack_v067ex.zip (72.3 KB, 211 views)
File Type: zip KindleUnpack_v067_to_v67ex_patch.zip (22.7 KB, 209 views)
tkeo is offline   Reply With Quote