View Single Post
Old 01-16-2012, 04:29 PM   #264
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,817
Karma: 6000000
Join Date: Nov 2009
Device: many
Hi DiapDealer,

I will try to modify the code in mobi_html.py to find and fix kindle:flow references inside url references in the flowparts (css pieces).

That may help. Once we get that going you can see what else needs to be fixed. It would help if you could create a test case for me to play with.

Take care,

KevinH

Quote:
Originally Posted by DiapDealer View Post
That did the trick!

Now then... with the way Amazon is allowing you to define separate CSS files (or special CSS directives) to handle the way the fall-back mobi is styled vs the KF8 styling... there may be some parsing of the actual css files themselves needed to build a fully working epub, ready to be fed back to kindlegen.

In my case, I'm using @import statements to tell kindlegen how to build the two different components, but the new Kindle Publishing Guideline defines four different methods to achieve this.

So my main stylesheet (called by the individual xhtml files) in my source ePub consists only of this:

Code:
@import url(../Styles/mobi7.css) amzn-mobi;
@import url(../Styles/kf8.css) amzn-kf8;
Kindlegen then pulls in those two stylesheets to build the hybrid mobi.

When I unpacked my KF8 mobi, my main stylesheet looked like:
Code:
@import url(XXXXXXXXXXXXXXXX) amzn-mobi;
@import url(kindle:flow:0002?mime=text/css) all;
If that second import statement were:
Code:
@import url(../Styles/style0002.css) all;
the ePub would display using the KF8 stylesheet. But the stylesheet needed to properly build the fall-back mobi appears to have been lost in the shuffle. For all I know, it may not even exist anymore (outside the SRC).
KevinH is online now   Reply With Quote