View Single Post
Old 09-13-2012, 08:09 PM   #419
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 9,037
Karma: 40855212
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
I made some modifications to two of the files in Mobi_Unpack: "mobi_unpack.py" and "mobi_opf.py".

The change to mobi_unpack.py is due to at least one report of complete failure because a font couldn't be properly extracted. I added some error-handling to accommodate the occasional wonky font without causing the entire process to bomb.

The change to mobi_opf.py is to simply entity escape the KF8 metadata so the resulting OPF is valid when the occasional special character is encountered (RE: Jon's next-to-last post).

@Pdurrant: if you (or anybody) wants to check it out and see if it makes sense... I've advanced the version to 0.54 if you want to update the first post. Feel free to change it all up (or ignore) if you have different plans or see a better way to accomplish the same goals.

Thanks!
Attached Files
File Type: zip Mobi_Unpack_v054.zip (45.1 KB, 78 views)
DiapDealer is online now   Reply With Quote