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

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 01-15-2010, 03:52 AM   #1
ChristopherTD
Addict
ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.
 
ChristopherTD's Avatar
 
Posts: 311
Karma: 1003456
Join Date: Apr 2008
Location: London. UK
Device: Marvin Reader on iPad Air (via Calibre)
ePub to ePub - just replace CSS?

I am experimenting with how to get ePub books to render nicely on my Sony PRS-600. This isn't a problem with format shifted titles as the Calibre conversion with some Custom CSS works nicely.

However, books purchased natively in ePub format are very variable and don't yield nicely to a simple fix. Looking further at a particularly obstinate title (Well of Ascension by Brandon Sanderson) I turned on the debug option and looked at the various stages. It occurred to me that the simplest way to influence the appearance was simply hand editting the CSS in the "input" folder and then rebundling up the book from there. This works nicely and has the advantage that it hasn't been "translated" (just in case that subtly alters something).

So...

Is it feasible to have 2 extra options in Calibre?

Extract CSS - to extract the CSS from an ePub book and pop it into the directory where Calibre stores the book

Replace CSS - to reinsert the CSS from that (following edit) into the book?

Is there even a standard name/location for CSS? If there was and these two options were available it would dramatically simplify messing with the appearance of an ePub book, without altering the actual book content?

Vaguely possible or wildly improbable?
ChristopherTD is offline   Reply With Quote
Old 01-15-2010, 11:08 AM   #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: 25,916
Karma: 5035037
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Why not just convert from epub to epub. Disable the font size rescaling, and use extra css.
kovidgoyal is online now   Reply With Quote
 
Enthusiast
Old 01-15-2010, 11:27 AM   #3
ChristopherTD
Addict
ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.
 
ChristopherTD's Avatar
 
Posts: 311
Karma: 1003456
Join Date: Apr 2008
Location: London. UK
Device: Marvin Reader on iPad Air (via Calibre)
Converting from ePub to ePub doesn't always work for books with oddly named styles - or else I am not able to specify a wide enough scope in my extra CSS snippet.

For instance the book I was fiddling with had about 20 styles named p.* and they didn't get amended?
i.e.
p.para
{
font-family:"Times New Roman", serif;
font-size:medium;
margin-top:0em;
margin-bottom:0em;
text-align:justify;
text-indent:0em;
}

Could I influence them all with a statement like:

p {
line-height: 130%
font-family:"DroidSerif", serif;
}
ChristopherTD is offline   Reply With Quote
Old 01-15-2010, 11:38 AM   #4
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: 25,916
Karma: 5035037
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You have to use a selector of at least as high a specificity. So p.para will do the trick.
kovidgoyal is online now   Reply With Quote
Old 01-15-2010, 12:21 PM   #5
ChristopherTD
Addict
ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.
 
ChristopherTD's Avatar
 
Posts: 311
Karma: 1003456
Join Date: Apr 2008
Location: London. UK
Device: Marvin Reader on iPad Air (via Calibre)
OK thanks - I will continue to experiment.
ChristopherTD is offline   Reply With Quote
Old 01-15-2010, 04:19 PM   #6
jackie_w
Wizard
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 2,784
Karma: 3973173
Join Date: Sep 2009
Location: UK
Device: Sony PRS-350, PB360, Kobo Glo/AuraHD/Aura6"
EPUB to EPUB in Calibre

The biggest problem I have found with EPUB to EPUB in Calibre is that I invariably don't get the conversion parameters quite right the first time and have to keep refining them.

With any other source input format this is trivial but with EPUB/EPUB the source is overwritten by the converted output and I therefore have to reimport the original before having another go.

None of this is difficult but it is certainly not as convenient as keeping the input source separate from the converted output.

Would it be possible for Calibre to retain the original when the input and output formats are the same? Is it worth me raising an "enhancement ticket".
jackie_w is online now   Reply With Quote
Old 01-15-2010, 04:29 PM   #7
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: 25,916
Karma: 5035037
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
The way the database is setup, preserving the original would be rather difficult to implement. I suppose the GUI could just make a copy of the file before handing of the original to be converted, but that wouldn't really be much more convenient.
kovidgoyal is online now   Reply With Quote
Old 01-15-2010, 05:07 PM   #8
jackie_w
Wizard
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 2,784
Karma: 3973173
Join Date: Sep 2009
Location: UK
Device: Sony PRS-350, PB360, Kobo Glo/AuraHD/Aura6"
OK, thank you. I just thought I'd ask.
jackie_w is online now   Reply With Quote
Old 01-16-2010, 07:15 AM   #9
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: 8,838
Karma: 12535517
Join Date: Feb 2009
Location: North Carolina
Device: Nexus 7
Quote:
Originally Posted by jackie_w View Post
With any other source input format this is trivial but with EPUB/EPUB the source is overwritten by the converted output and I therefore have to reimport the original before having another go.
I'm not sure what you mean by reimport. What I do if my epub -> epub conversion goes wrong is

1. select book
2. select edit metadata
3. under available formats I delete the malformed epub.
4. under available formats I add the original epup.

This is quicker (and maintains metadata) than removing the book and adding it again via the main menu.

Still not the most convenient it could be.
DoctorOhh is offline   Reply With Quote
Old 01-16-2010, 02:24 PM   #10
jackie_w
Wizard
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 2,784
Karma: 3973173
Join Date: Sep 2009
Location: UK
Device: Sony PRS-350, PB360, Kobo Glo/AuraHD/Aura6"
Quote:
Originally Posted by dwanthny View Post
I'm not sure what you mean by reimport.
Yes, Walt, that is exactly what I meant by "reimport".

My only complaint (probably nit-picky) is that it is an extra step not necessary with any other input format.
jackie_w is online now   Reply With Quote
Old 01-16-2010, 08:48 PM   #11
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: 8,838
Karma: 12535517
Join Date: Feb 2009
Location: North Carolina
Device: Nexus 7
Quote:
Originally Posted by jackie_w View Post
Yes, Walt, that is exactly what I meant by "reimport".

My only complaint (probably nit-picky) is that it is an extra step not necessary with any other input format.
Not nit-picky at all.

In the words of a past president, "I feel your pain."
DoctorOhh is offline   Reply With Quote
Old 01-17-2010, 04:21 AM   #12
ChristopherTD
Addict
ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.
 
ChristopherTD's Avatar
 
Posts: 311
Karma: 1003456
Join Date: Apr 2008
Location: London. UK
Device: Marvin Reader on iPad Air (via Calibre)
The additional painful bit for me is that I have to transfer the book to the Sony to see if it worked! I may have to bite the bullet and jailbreak the device so that I can edit the location of the default stylesheet. Or maybe Sony will release firmware that allows basic appearance tweaks - change font, change font size, change margins.

[see flying pig]
ChristopherTD is offline   Reply With Quote
Old 01-17-2010, 04:27 AM   #13
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: 8,838
Karma: 12535517
Join Date: Feb 2009
Location: North Carolina
Device: Nexus 7
Quote:
Originally Posted by ChristopherTD View Post
The additional painful bit for me is that I have to transfer the book to the Sony to see if it worked! I may have to bite the bullet and jailbreak the device so that I can edit the location of the default stylesheet. Or maybe Sony will release firmware that allows basic appearance tweaks - change font, change font size, change margins.

[see flying pig]
Why do you have to send it to the reader to see if it worked?
DoctorOhh is offline   Reply With Quote
Old 01-22-2010, 01:04 AM   #14
ChristopherTD
Addict
ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.
 
ChristopherTD's Avatar
 
Posts: 311
Karma: 1003456
Join Date: Apr 2008
Location: London. UK
Device: Marvin Reader on iPad Air (via Calibre)
Quote:
Originally Posted by dwanthny View Post
Why do you have to send it to the reader to see if it worked?
Just because I am not yet familiar enough with the Sony to know how my changes will appear on the PRS-600. The Calibre/ADE/Sony Reader viewers all behave slightly differently in how they render an ePub. As I am trying to tailor the CSS so that it looks great on the Sony, I really need to look at it on that device...
ChristopherTD is offline   Reply With Quote
Old 01-22-2010, 01:30 AM   #15
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: 8,838
Karma: 12535517
Join Date: Feb 2009
Location: North Carolina
Device: Nexus 7
Quote:
Originally Posted by ChristopherTD View Post
Just because I am not yet familiar enough with the Sony to know how my changes will appear on the PRS-600. The Calibre/ADE/Sony Reader viewers all behave slightly differently in how they render an ePub. As I am trying to tailor the CSS so that it looks great on the Sony, I really need to look at it on that device...
Thanks for the answer.

Most of the time I can tell if it got screwed up using Calibre's viewer. Noticing the difference once on the device has a level of attention to detail that is beyond me. If you get a standard set of css settings that work best for you on the 600 past them along.
DoctorOhh 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
Replace DEFAULT epub fonts! (PRS-505) pepak Sony Reader Dev Corner 70 01-22-2011 07:20 PM
PRS-600 Replace DEFAULT epub fonts! (PRS-600) pepak Sony Reader 31 06-22-2010 11:34 AM
converting to epub with my css fbrzvnrnd Calibre 3 04-15-2010 02:46 AM
find and replace, epub ampsonic Reading and Management 3 03-02-2010 03:20 AM
epub, ADE and CSS puzzle pdurrant ePub 3 09-03-2009 01:07 PM


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


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