View Single Post
Old 06-18-2014, 10:06 AM   #789
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,962
Karma: 6361444
Join Date: Nov 2009
Device: many
Hi tkeo,

If we did we should probably have to rename it to resource_info since it would need to store fonts, images, HDImages, possibly your RESC, and also the pageMap info as well.

Also, I don't think we should be passing around lists with the actual data in it. Image and font data can be quite big, especially when all we need is the name and the type and where it is stored.

If you don't like storing them in the mobi7 folder first then, I guess I don't understand why we can't simply write the files to a neutral location as we read them. Perhaps a base Images/ and HDImages/ and then in processMobiX put them in the proper location?

Also for the mobi 8 we want to create both an epub file and leave it unpacked in place so that users can see what is there more easily.

I will take a look at your v067 code to get a better idea of how you are using it.

Thanks,

Kevin


Quote:
Originally Posted by tkeo View Post
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,
KevinH is offline   Reply With Quote