Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > Kindle Formats

Notices

Reply
 
Thread Tools Search this Thread
Old 07-19-2012, 03:55 PM   #406
pdurrant
The Grand Mouse
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 30,826
Karma: 85467920
Join Date: Jul 2007
Location: Norfolk, England
Device: NOOK ST GlowLight
Quote:
Originally Posted by nleblanc88 View Post
Nope, thats what I'm doing. The OPF file looks like this:

Code:
<meta name="EmbeddedCover" content="images/image00002.jpeg" />
When I compile it with Kindlgen, it gives me the following:

Code:
Warning(prcgen):W14016: Cover not specified
.

Other files have no mention of the cover in the OPF file, yet the original mobi file contains a cover which is being displayed properly in the reader.
It sounds like one of the recent updates has messed up the cover metadata. I'll take a look.
pdurrant is online now   Reply With Quote
Old 07-19-2012, 05:04 PM   #407
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: 8,761
Karma: 39536849
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
I think it might actually be changes to Kindlegen that have broken the cover functionality. I don't think the EmbeddedCover meta-tag is valid any more.

The following quick mods (attached patch) to the mobi_opf.py file seems to get the cover functionality going again for unpacked MOBI6/7 files fed right back to the latest versions of Kindlegen ... but it's only intended as proof of concept, and could very well break something else.

Basically, instead of the EmbeddedCover meta tag pointing directly to the cover image file, it (Kindlegen) is expecting the format of:
Code:
<meta name="cover" content="cover_img" />
and then the standard matching, manifested image file in the spine:
Code:
<item id="cover_img" media-type="image/jpeg" href="images/image00001.jpeg" />
That might actually simplify some of the MOBI/KF8 logic in the mobi_opf.py file, I should think.
Attached Files
File Type: zip mobi_opf_patch.zip (441 Bytes, 82 views)

Last edited by DiapDealer; 07-19-2012 at 05:06 PM.
DiapDealer is offline   Reply With Quote
Old 07-19-2012, 05:21 PM   #408
pdurrant
The Grand Mouse
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 30,826
Karma: 85467920
Join Date: Jul 2007
Location: Norfolk, England
Device: NOOK ST GlowLight
Quote:
Originally Posted by DiapDealer View Post
I think it might actually be changes to Kindlegen that have broken the cover functionality. I don't think the EmbeddedCover meta-tag is valid any more.

No, what's happened is that at some point the EmbeddedCover tag has been generated incorrectly. It ought to look like

<x-metadata><EmbeddedCover>Cove Image Name.jpg</EmbeddedCover></x-metadata>

And if changed to that, KindleGen handles it fine.

But that's unofficial support left over from Mobipocket Generator.

I think it's probably best if we drop support for Mobipocket Generator, and tweak things to work only with KindleGen.

There's another problem too - we're including the thumbnumber cover image in the manifest, which causes a cycle of Mobiunpack/Kindlegen to add an extra image - a new thumbnail each time.

Whether this is because the metadata is declared incorrectly, or because KindleGen can't handle being given an explicit thumbail image I'm not sure.

There's also a problem of empty anchors not being removed well enough, causing extra empty anchors to be added on each cycle through as well.

I'll work on a fix for all this over the weekend.

Last edited by pdurrant; 07-21-2012 at 03:35 PM.
pdurrant is online now   Reply With Quote
Old 07-19-2012, 08:31 PM   #409
DaleDe
Grand Sorcerer
DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.
 
DaleDe's Avatar
 
Posts: 9,503
Karma: 4597184
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2
you might want to archive and mark the last version with Mobipocket Creator support.

Dale
DaleDe is offline   Reply With Quote
Old 07-20-2012, 05:43 AM   #410
pdurrant
The Grand Mouse
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 30,826
Karma: 85467920
Join Date: Jul 2007
Location: Norfolk, England
Device: NOOK ST GlowLight
Quote:
Originally Posted by DaleDe View Post
you might want to archive and mark the last version with Mobipocket Creator support.

Dale
A good point. I should have a copy here somewhere.
pdurrant is online now   Reply With Quote
Old 07-21-2012, 04:33 PM   #411
pdurrant
The Grand Mouse
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 30,826
Karma: 85467920
Join Date: Jul 2007
Location: Norfolk, England
Device: NOOK ST GlowLight
Version 0.52 now uploaded to the first post in this thread.
I've also uploaded the last "unified" version, 0.32, which was just before KF8 support got added, and Mobipocket Creator support got broken.
pdurrant is online now   Reply With Quote
Old 07-25-2012, 11:43 AM   #412
KevinH
Guru
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: 805
Karma: 312304
Join Date: Nov 2009
Device: many
update to Mobi_UNpack

Hi Paul,

I have added support for the new metadata items being used in the very latest version of Kindlegen as well as a fix for splitting joint mobis, that did not properly handle the header flag bit 12 (0x1000) which was recently found to indicate the presence of embedded fonts or not (see the Calibre thread on AZW3 and embedded fonts on KT).

Here is the Mobi_unpack_v053.zip. If you get a free moment would you update your first post with it.

Thanks,

KevinH
Attached Files
File Type: zip Mobi_Unpack_v053.zip (46.8 KB, 101 views)
KevinH is offline   Reply With Quote
Old 07-26-2012, 04:19 AM   #413
pdurrant
The Grand Mouse
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 30,826
Karma: 85467920
Join Date: Jul 2007
Location: Norfolk, England
Device: NOOK ST GlowLight
Quote:
Originally Posted by KevinH View Post
If you get a free moment would you update your first post with it.
Done. I've also updated the AppleScript.
pdurrant is online now   Reply With Quote
Old 07-27-2012, 10:54 AM   #414
amarie0
Member
amarie0 doesn't litteramarie0 doesn't litter
 
Posts: 20
Karma: 110
Join Date: Dec 2010
Location: Chicago, IL
Device: iPad, Kindle
Paul, when I click either the python or the applescript link in the first post, I get an alert message "Invalid Attachment specified. If you followed a valid link, please notify the administrator"

That's where you've posted the latest versions, is that right?
amarie0 is offline   Reply With Quote
Old 07-27-2012, 11:14 AM   #415
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 36,194
Karma: 17169472
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Sony Reader PRS-650, iPad, nook STR
Quote:
Originally Posted by KevinH View Post
Hi Paul,

I have added support for the new metadata items being used in the very latest version of Kindlegen as well as a fix for splitting joint mobis, that did not properly handle the header flag bit 12 (0x1000) which was recently found to indicate the presence of embedded fonts or not (see the Calibre thread on AZW3 and embedded fonts on KT).

Here is the Mobi_unpack_v053.zip. If you get a free moment would you update your first post with it.

Thanks,

KevinH
I've encountered a bug in the new version. The ePub it created from an Amazon downloaded KF8 (with embedded fonts) is invalid.

The problem is thus...

Code:
<dc:publisher>Simon & Schuster, Inc.</dc:publisher>
should have been converted to...

Code:
<dc:publisher>Simon &amp; Schuster, Inc.</dc:publisher>
After that is done, ADE does open the ePub even though there are still a few errors that are easily fixed.

Last edited by JSWolf; 07-27-2012 at 11:26 AM.
JSWolf is offline   Reply With Quote
Old 07-27-2012, 11:53 AM   #416
pdurrant
The Grand Mouse
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 30,826
Karma: 85467920
Join Date: Jul 2007
Location: Norfolk, England
Device: NOOK ST GlowLight
Quote:
Originally Posted by amarie0 View Post
Paul, when I click either the python or the applescript link in the first post, I get an alert message "Invalid Attachment specified. If you followed a valid link, please notify the administrator"

That's where you've posted the latest versions, is that right?
Whoops. Changed the attachments, but forgot to change the links in the post. Now fixed.
pdurrant is online now   Reply With Quote
Old 07-27-2012, 11:54 AM   #417
pdurrant
The Grand Mouse
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 30,826
Karma: 85467920
Join Date: Jul 2007
Location: Norfolk, England
Device: NOOK ST GlowLight
Quote:
Originally Posted by JSWolf View Post
IThe problem is thus...

Code:
<dc:publisher>Simon & Schuster, Inc.</dc:publisher>
should have been converted to...

Code:
<dc:publisher>Simon &amp; Schuster, Inc.</dc:publisher>
Thanks, Jon. it seems we should be making sure text is escaped, and we're not.
pdurrant is online now   Reply With Quote
Old 07-27-2012, 01:14 PM   #418
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 36,194
Karma: 17169472
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Sony Reader PRS-650, iPad, nook STR
Quote:
Originally Posted by pdurrant View Post
Thanks, Jon. it seems we should be making sure text is escaped, and we're not.
Happy to help. Looking forward to 054.
JSWolf is offline   Reply With Quote
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: 8,761
Karma: 39536849
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, 73 views)
DiapDealer is offline   Reply With Quote
Old 09-14-2012, 03:13 AM   #420
pdurrant
The Grand Mouse
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 30,826
Karma: 85467920
Join Date: Jul 2007
Location: Norfolk, England
Device: NOOK ST GlowLight
Quote:
Originally Posted by DiapDealer View 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!
It looks good to me. First post updated.
pdurrant is online now   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can i rotate text and insert images in Mobi and EPUB? JanGLi Kindle Formats 5 02-02-2013 04:16 PM
PDF to Mobi with text and images pocketsprocket Kindle Formats 7 05-21-2012 07:06 AM
Mobi files - images DWC Introduce Yourself 5 07-06-2011 01:43 AM
pdf to mobi... creating images rather than text Dumhed Calibre 5 11-06-2010 12:08 PM
Transfer of images on text files anirudh215 PDF 2 06-22-2009 09:28 AM


All times are GMT -4. The time now is 08:44 AM.


MobileRead.com is a privately owned, operated and funded community.