View Single Post
Old 01-31-2011, 04:41 AM   #16
sherman
Addict
sherman can bend spoons with a thought.sherman can bend spoons with a thought.sherman can bend spoons with a thought.sherman can bend spoons with a thought.sherman can bend spoons with a thought.sherman can bend spoons with a thought.sherman can bend spoons with a thought.sherman can bend spoons with a thought.sherman can bend spoons with a thought.sherman can bend spoons with a thought.sherman can bend spoons with a thought.
 
Posts: 279
Karma: 134960
Join Date: Sep 2008
Location: Auckland - NZ
Device: Sony PRS-505/SC, B&N Nook, Sony PRS-650/BC, Kobo Glo
Tweak/fix epub css and/or xpgt

Hi folks.

Well, when I purchase a book, I like to retain all it's formatting and don't like doing an epub-to-epub conversion. However, most publishers don't do a "perfect" epub (in my opinion) and usually require a few css and xpgt tweaks before I load it on to my reader.

However, the publishers use a master template, so the changes I like to make to one book are identical to any other book by that publisher. This of course gets very repetitive very quickly...

So I was wondering if it were possible if someone was interested in making a plugin that would open an epub, run a series of find/replace operations on the css and xpgt files within and repackage the epub -- basically an "automated" Tweak Epub feature.

Example:
For some reason, Penguin books scale down the fonts by one "size". so a typical body paragraph has the following style
Code:
.tx {
font-size: small;
text-align: justify;
text-indent: 15px;
}
So therefore, when I make my alterations x-large becomes xx-large, large to x-large, medium to large, delete small, x-small to small, xx-small to x-small. I also like to change the indent to around 1.3em.

I also like to change the margins in the page-template.xpgt to 5px.



Any thoughts?
sherman is offline   Reply With Quote