Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Conversion

Notices

Reply
 
Thread Tools Search this Thread
Old 12-16-2012, 03:44 PM   #1
Agama
Guru
Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.
 
Agama's Avatar
 
Posts: 776
Karma: 2751519
Join Date: Jul 2010
Location: UK
Device: PW2, Nexus7
Crossing the Rubicon into Kindle Land

I've been considering a new eReader for some time now and my first choice has been to stick with ePub and Sony. However, I had a hands-on with a Kindle Paperwhite today and was really impressed.

I've built up a collection of ePubs, many of which have been hand-tweaked for styling and structure and I would like to keep all this on my next reader. So my conversion question is quite general: if I convert these to AZW3 using calibre, is the formatting likely to be preserved?

For example:

1) Horizontal and vertical margins on headers and paragraphs, whether in em or pt.
2) Tables including borders.
3) Borders on DIV elements.
4) Multi-level TOC (like ePub's toc.ncx).

Are there any ePub features that cannot be converted?
Agama is offline   Reply With Quote
Old 12-16-2012, 10:12 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,842
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
An epub to azw3 conversion is essentially the same as an epub to epub conversion. I suggest your download Kindle Previewer, convert a couple of books and see what happens.
kovidgoyal is offline   Reply With Quote
Advert
Old 12-17-2012, 02:24 PM   #3
Agama
Guru
Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.
 
Agama's Avatar
 
Posts: 776
Karma: 2751519
Join Date: Jul 2010
Location: UK
Device: PW2, Nexus7
Well, that was a huge download, (>150MB), but worth the effort - thanks!

Conversion and rendering are nigh on perfect, provided I disable chapter detection and page-break insertion on the Structure Detection page.

Inspecting an exploded AZW3 shows a book very like an ePub but lacking the META-INF folder with its container.xml.

Is the separation into folders, (fonts/images/styles/text), an AZW3 requirement or a calibre convention?

Why does the stylesheet.css get split into multiple parts?

It looks to me as though the ePub could actually be restructred into an AZW3 without actually going through any conversion process - or am I missing something important here?
Agama is offline   Reply With Quote
Old 12-17-2012, 04:37 PM   #4
Agama
Guru
Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.
 
Agama's Avatar
 
Posts: 776
Karma: 2751519
Join Date: Jul 2010
Location: UK
Device: PW2, Nexus7
I've done a test with an ePub and restructured it into an AZW3. I simply exploded the AZW3 and deleted all the files/folders, then pasted in everything from an exploded ePub, (except the META-INF folder). Finally I renamed content.opf to metadata.opf and rebuilt the AZW3.

Kindle Previewer was perfectly happy with the result, including the TOC. This is much faster than doing a conversion. The only odd thing is that the ePub is 203KB and the AZW3 is 319KB. Looks like I can therefore write a simple plugin to do this job.

One issue I have found with ePub to AZW3 is that Kindle Previewer complains that there is a "Missing Cover Image" and that this is "an integral part of the Kindle reading experience". This happens whether calibre does the conversion or I use my restructure method.
Agama is offline   Reply With Quote
Old 12-17-2012, 10:38 PM   #5
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,842
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
azw3 is essentially epub, just in an ugly binary wrapper, that only amazon could have designed. However, the various amazon html renderes tend to have a different set of quirks from the various epub renderers, some of which only a full conversion will work around.
kovidgoyal is offline   Reply With Quote
Advert
Old 12-18-2012, 02:45 AM   #6
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
It's great that you have gone and sorted out the epub to azw3 info. I'm sure many folks might be interested.

Quote:
Originally Posted by Agama View Post
I've been considering a new eReader for some time now and my first choice has been to stick with ePub and Sony. However, I had a hands-on with a Kindle Paperwhite today and was really impressed.
I always said I wouldn't move away from Sony until I had a device that was as well integrated with calibre for collections, tags and automatic metadata updates as the Sony devices are.

When I saw that chaley & son were writing an android app (Calibre Companion) that would essentially duplicate the level of integration I experienced with Sony devices I decided to buy a Nexus 7. I didn't think I could use any backlit display as an ereader because my older eyes are very sensitive to reading for any length of time on a backlit display. I found though that with the right theme in my reading app and the brightness on my device reduced to 1% I have no problem using the Nexus 7 as an ereader. This surprised the heck out of me.

I only mentioned the above because handling collections and where books are placed on Kindles is different then you have been used too. Keep us informed on your progress and I look forward to following your possible ePub to azw3 repackaging plugin.
DoctorOhh is offline   Reply With Quote
Old 12-18-2012, 03:02 AM   #7
Agama
Guru
Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.
 
Agama's Avatar
 
Posts: 776
Karma: 2751519
Join Date: Jul 2010
Location: UK
Device: PW2, Nexus7
My plugin will have to use some code from the Tweak Book plugin as this must deal with the AZW3 "binary wrapper". Maybe this wrapper is responsible for bloating the file size, though I guess it must serve some purpose.

Any thoughts on the Missing Cover Image?

@DoctorOhh : I can't get on with backlit displays for reading either. I had assumed that all readers have some sort of collections management which integrates with calibre, but it sounds like I need to do some more research here. Do you have any experience with collections on Kindles?
Agama is offline   Reply With Quote
Old 12-18-2012, 03:27 AM   #8
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by Agama View Post
@DoctorOhh : I can't get on with backlit displays for reading either.
I was as surprised as anyone that the Nexus 7 on the lowest brightness level allowed me to read effortlessly. Since I had Lasik done my eyes have been even more sensitive to backlit displays. I attached my current Moon+reader theme.

Quote:
Originally Posted by Agama View Post
I had assumed that all readers have some sort of collections management which integrates with calibre, but it sounds like I need to do some more research here. Do you have any experience with collections on Kindles?
My only experience is reading folks initial frustration with setting up collections on the Kindle. There is a kindle collections plugin, but last I heard it wasn't working on the Touch or the PW. Search the forums and ask around to find out if kindle collections plugin is working with PW. I did see some threads on jailbreaking the device and setting up collections. Investigate, they may have everything worked out by now.

After reading all of the frustration I decided I would stick to Sony, which is so well integrated with calibre it is easy to assume every device has the same ease of use. Unfortunately hardly any device has the complete device integration with calibre that Sony had. The Nexus 7 using Calibre Companion is one of those devices. That may have to do with the fact that the same developer (chaley) integrated both devices with calibre.
Attached Thumbnails
Click image for larger version

Name:	2012-12-18 03.32.45.png
Views:	195
Size:	350.2 KB
ID:	97846  

Last edited by DoctorOhh; 12-18-2012 at 04:21 AM.
DoctorOhh is offline   Reply With Quote
Old 12-18-2012, 02:08 PM   #9
Agama
Guru
Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.
 
Agama's Avatar
 
Posts: 776
Karma: 2751519
Join Date: Jul 2010
Location: UK
Device: PW2, Nexus7
I've started looking at how to do this via a plugin and noticed that something odd is going on. After deleting all the azw3 contents and copying in the ePub contents, the rebuild works fine. However, re-exploding shows that the rebuilder has done rather more than simply re-assemble the file:

1) The individual html files have been renamed and moved to a text folder.
2) The stylesheet.css has been split into 3 css files and moved to a styles folder.
3) The images have been renamed and moved to an images folder.
4) The metadata.opf has been re-written to reflect the above changes.

This must all be happening inside the Tweak Book rebuild and probably explains why this rebuild takes so much longer for azw3 than for ePub, (which only has to rezip the exploded contents.) Whilst this doesn't invalidate the idea of repacking an ePub into azw3, I need to have a look at the code in Tweek Book to see exactly what's going.
Agama is offline   Reply With Quote
Old 12-18-2012, 11:07 PM   #10
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,842
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
There are no files inside an azw3, therefore your file structure will never be preserved.
kovidgoyal is offline   Reply With Quote
Old 12-19-2012, 12:49 AM   #11
AlexBell
Wizard
AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.
 
AlexBell's Avatar
 
Posts: 3,413
Karma: 13369310
Join Date: May 2008
Location: Launceston, Tasmania
Device: Sony PRS T3, Kobo Glo, Kindle Touch, iPad, Samsung SB 2 tablet
Quote:
Originally Posted by kovidgoyal View Post
An epub to azw3 conversion is essentially the same as an epub to epub conversion. I suggest your download Kindle Previewer, convert a couple of books and see what happens.
This may be off topic, but I wonder why you recommend the Kindle Previewer. I've been using calibre to convert ePub to old mobi+azw3 (ie 'both' setting) and it seems to work. Is there anything I should be careful of?
AlexBell is offline   Reply With Quote
Old 12-19-2012, 12:51 AM   #12
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,842
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
The recommendation was to use the Previewer to view the files not convert them.
kovidgoyal is offline   Reply With Quote
Old 12-19-2012, 09:09 AM   #13
Agama
Guru
Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.
 
Agama's Avatar
 
Posts: 776
Karma: 2751519
Join Date: Jul 2010
Location: UK
Device: PW2, Nexus7
The previewer has been useful in showing me that calibre will do a good job of converting my ePubs to azw3, which was my real question. I then got diverted into making an azw3 by repacking an ePub - which seems to work.

If there are no files within an azw3 then presumably calibre's Tweek Book exploder is producing the structure of folders and files which are then displayed, and the rebuild turns any structure found after tweeking back into an azw3?
Agama is offline   Reply With Quote
Old 12-19-2012, 12:51 PM   #14
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,842
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
yes .
kovidgoyal is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Free Book (Kindle) - Crossing the Line koland Deals and Resources (No Self-Promotion or Affiliate Links) 4 11-29-2010 02:31 PM
Free book (Kindle/Nook) Crossing Oceans arcadata Deals and Resources (No Self-Promotion or Affiliate Links) 0 11-15-2010 03:28 AM
Free Book (Kindle) - Immortals: The Crossing koland Deals and Resources (No Self-Promotion or Affiliate Links) 0 09-15-2010 03:39 AM
Neptune Crossing in Kindle and Smashwords -- SF by Jeffrey A. Carver starrigger Self-Promotions by Authors and Publishers 11 09-14-2010 12:03 AM


All times are GMT -4. The time now is 06:05 AM.


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