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 02-25-2014, 07:54 AM   #676
tkeo
Connoisseur
tkeo began at the beginning.
 
Posts: 76
Karma: 10
Join Date: Feb 2014
Location: Japan
Device: Kindle PaperWhite, Kobo Aura HD
Hi DiapDealer,

Quote:
Originally Posted by DiapDealer View Post
Just out of curiosity, are you manufacturing the "linear=No" attribute for the created cover page's spine entry? Or is that something that unpacks "as is"?
I wrote "linear=No" on purpose. I thought it should be set to "No" for a cover page; from a few references:
http://blog.threepress.org/2009/11/2...-cover-images/
http://wiki.mobileread.com/wiki/Ebook_Covers
But, I am not confident so much.


Quote:
Originally Posted by DiapDealer View Post
I prefer the somewhat "standard" svg method of creating a cover page, but that's just a personal preference. Feel free to take a look at my hacked-up mobi_k8resc.py file if you're interested at all. I've added a 'borrowed' method to get the necessary dimensions of jpeg, gif, or png images (and removed the 'linear' attribute for my own selfish reasons). Don't feel any pressure to adopt my changes or anything. I don't mind adjusting the "official" codebase to suit my needs. That's how I get my practice.

Thanks for your input on the project, by the way. Much appreciated!
I am impressed by looking at the code you posted (though 'borrowed'). It's quite nice!
In oder to use svg wrapper, the size of an image is necessary; I thought it needs an extra library like PIL, (I don't hesitate to use the PIL if it was just for my private use.) To avoid using the extra library, I wrote that style.

Thanks,

Last edited by tkeo; 02-25-2014 at 08:17 AM.
tkeo is offline   Reply With Quote
Old 02-25-2014, 08:21 AM   #677
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,124
Karma: 40942904
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by tkeo View Post
I wrote "linear=No" on purpose. I thought it should be set to "No" for a cover page; from a few references:
http://blog.threepress.org/2009/11/2...-cover-images/
http://wiki.mobileread.com/wiki/Ebook_Covers
But, I am not confident so much.
Yours is probably the best approach for source/epubs that are going to be edited and then run right back through kindlegen. That's what Amazon suggests, actually--to get around their no cover-page "rule" with epubs as the source. For those who may be using KindleUnpack simply to get a clean(er) epub from a KF8, that may not be in their best interest. But it can be easily changed in an editor in that case, too.

I would stick with your approach, though. I asked mainly because I couldn't find where that string was created, at first glance.

Quote:
I thought it needs an extra library like PIL. To avoid using the extra library, I wrote that style.
I thought the same thing (PIL)! Then a search turned up that particular method. I guess in a perfect world, I'd like to see the dimensions stored in the same dictionary as the image names when the image data is first extracted--so there'd be no need to re-read that file in the cover-page creation routines--but that's for a future rainy day.

Of course, I quickly cobbled that together--I suspect it might break easily. Probably needs to be some basic error-handling to make it die a little more gracefully if that happens.
DiapDealer is online now   Reply With Quote
 
Enthusiast
Old 03-10-2014, 11:22 AM   #678
m0ngr31
Connoisseur
m0ngr31 could sell banana peel slippers to a Deveel.m0ngr31 could sell banana peel slippers to a Deveel.m0ngr31 could sell banana peel slippers to a Deveel.m0ngr31 could sell banana peel slippers to a Deveel.m0ngr31 could sell banana peel slippers to a Deveel.m0ngr31 could sell banana peel slippers to a Deveel.m0ngr31 could sell banana peel slippers to a Deveel.m0ngr31 could sell banana peel slippers to a Deveel.m0ngr31 could sell banana peel slippers to a Deveel.m0ngr31 could sell banana peel slippers to a Deveel.m0ngr31 could sell banana peel slippers to a Deveel.
 
Posts: 66
Karma: 3056
Join Date: Dec 2010
Device: Kindle Paperwhite
How hard would it be to be able use this to update the meta information inside a mobi (like mobi2mobi) instead of unpacking it?
m0ngr31 is offline   Reply With Quote
Old 03-10-2014, 11:49 AM   #679
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,124
Karma: 40942904
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by m0ngr31 View Post
How hard would it be to be able use this to update the meta information inside a mobi (like mobi2mobi) instead of unpacking it?
There's lots of code in Kindleunpack used for accessing the EXTH data. But with the exception of a few routines in the portion that splits hybrid mobi/kf8's, it's not really geared toward modifying existing binary kindlebooks "on the fly," so to speak.
DiapDealer is online now   Reply With Quote
Old 03-10-2014, 12:06 PM   #680
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: 31,869
Karma: 88206086
Join Date: Jul 2007
Location: Norfolk, England
Device: NOOK ST GlowLight
Quote:
Originally Posted by m0ngr31 View Post
How hard would it be to be able use this to update the meta information inside a mobi (like mobi2mobi) instead of unpacking it?
It would need a whole lot of new code, I think. Extracting to files, or stripping out sections is very different to re-writing (say) the EXTH section.

But this is probably you best place to start if you want to have a stand-alone modern python-based mobi2mobi kind of function.

The other alternative would be the calibre source code, which (obviously) already has code to create Mobipocket format files.
pdurrant is offline   Reply With Quote
Old 03-10-2014, 01:37 PM   #681
shyamusingh
Junior Member
shyamusingh began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Mar 2014
Device: iPad
Help Required

Hi All,

Can any one suggest me how can I convert ePub format to kf8 format...

thanks in advance...

Shyamu Singh
shyamusingh is offline   Reply With Quote
Old 03-10-2014, 02:17 PM   #682
hosein
Junior Member
hosein began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Mar 2014
Device: Kindle Paperwhite 2013
Quote:
Originally Posted by shyamusingh View Post
Hi All,

Can any one suggest me how can I convert ePub format to kf8 format...

thanks in advance...

Shyamu Singh
Hi,
Use kindle previewer program.
Open the epub in the program.
The program automatically convert it to mobi.
hosein is offline   Reply With Quote
Old 03-10-2014, 02:31 PM   #683
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: 31,869
Karma: 88206086
Join Date: Jul 2007
Location: Norfolk, England
Device: NOOK ST GlowLight
Quote:
Originally Posted by shyamusingh View Post
Can any one suggest me how can I convert ePub format to kf8 format...
Calibre can also convert from ePub to KF8/AZW3. Provided the ePyb doens't have DRM of course. If that's the case, google for Apprentice Alf.
pdurrant is offline   Reply With Quote
Old 03-14-2014, 12:56 AM   #684
shyamusingh
Junior Member
shyamusingh began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Mar 2014
Device: iPad
thx

Quote:
Originally Posted by hosein View Post
Hi,
Use kindle previewer program.
Open the epub in the program.
The program automatically convert it to mobi.
Thanks a lot for your support...

Basically I want to know what are changes required when we convert ePub to KF8..

rgds,
Shyamu
shyamusingh is offline   Reply With Quote
Old 03-14-2014, 12:59 AM   #685
shyamusingh
Junior Member
shyamusingh began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Mar 2014
Device: iPad
thanks pdurrant for your support...

This is an automatic conversion by calibre but there are lots of correction required in ePub before convert to KF8.

So what are the changes required in ePub thats I want to know...

rgds,
Shyamu
shyamusingh is offline   Reply With Quote
Old 03-14-2014, 01:03 AM   #686
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,631
Karma: 5071814
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2
Quote:
Originally Posted by shyamusingh View Post
thanks pdurrant for your support...

This is an automatic conversion by calibre but there are lots of correction required in ePub before convert to KF8.

So what are the changes required in ePub thats I want to know...

rgds,
Shyamu
Generally speaking there are no changes required to ePub in order to convert it to KF8. KF8 can be thought of as a compiled version of ePub where the ePub source is compiled into a KF8 binary in a mobi wrapper. Read about it on our wiki under KF8.

Dale
DaleDe is offline   Reply With Quote
Old 03-14-2014, 03:20 AM   #687
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: 31,869
Karma: 88206086
Join Date: Jul 2007
Location: Norfolk, England
Device: NOOK ST GlowLight
Quote:
Originally Posted by shyamusingh View Post
This is an automatic conversion by calibre but there are lots of correction required in ePub before convert to KF8.

So what are the changes required in ePub thats I want to know...
If using calibre, there are no specific changes required to the ePub.

If using Kindlegen or Kindle Previewer, there are some Amazon-specific changes you could make (see the Amazon documentation), but that's to turn the ePub into source for Kindlegen rather than changes to the ePub to make it a better ePub.
pdurrant is offline   Reply With Quote
Old 03-14-2014, 11:40 AM   #688
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,631
Karma: 5071814
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2
A recommended addition to the ePub is to ensure that it has a inline TOC. Some conversion techniques won't include the ePub TOC so you need on in the document itself.

Dale
DaleDe is offline   Reply With Quote
Old 03-21-2014, 01:04 AM   #689
shyamusingh
Junior Member
shyamusingh began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Mar 2014
Device: iPad
thx

Thanks to all of you for your support..
shyamusingh is offline   Reply With Quote
Old 04-07-2014, 03:58 AM   #690
EbokJunkie
Zealot
EbokJunkie began at the beginning.
 
Posts: 124
Karma: 16
Join Date: Feb 2009
Location: SoCal
Device: Kindle 3, Kindle PW, Pocketbook 301+, Pocketbook Touch, Sony 950, 350
Have a very limited expertize in Python but have a pressing need to edit some fields in exth of existing azw3.
Looking at mobi_split code I found all function needed for editing mobi file and saving result to azw3, that is read_exth, del_exth, and add_exth.
In my case I don't have mobi but have only azw3 file.
Could you give me some general ideas how can I apply the same tools that class mobi_split provides (sure only if they are applicable) to simple azw3 editing?
I just need to add 501, and modify 202 with content of 201.
Added:
Found this and understood that solution is not that easy nut to crack...

Last edited by EbokJunkie; 04-07-2014 at 04:10 AM.
EbokJunkie is offline   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 04:27 PM.


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