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

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

Notices

Reply
 
Thread Tools Search this Thread
Old 02-12-2013, 09:16 PM   #1
jgoguen
Generally Awesome Person
jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.
 
Posts: 1,061
Karma: 2178845
Join Date: Jan 2013
Location: /dev/kmem
Device: Kobo Clara HD, Kindle Oasis
CSS conversion from a plugin

I'm trying to figure out how I can set a CSS rule (specifically, margin:0px) while my plugin is processing books, but I'm not sure how to do it. Some files reference a single CSS file, some reference multiple CSS files, some have one or more CSS files and their own style tag...

Is there a (relatively) easy way through calibre to find any margin declarations and change them to 0, or set margin:0px if there is no margin rules?
jgoguen is offline   Reply With Quote
Old 02-12-2013, 11:11 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,779
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
No, there isn't. You have to parse all the css files, all the html files, connect all style rules to their elements, go through all style tags and style attributes, update style rules as per css precedence and then finally change things. Why do you think the calibre conversion process is so involved.
kovidgoyal is offline   Reply With Quote
Advert
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
html to epub conversion with extra CSS oilizer Conversion 4 10-23-2011 08:51 AM
add css file to epub conversion VICTORSJG Calibre 0 09-21-2011 07:38 AM
AZW Conversion Output Plugin tylau0 Plugins 59 08-14-2011 10:36 PM
EPub conversion stylesheet.css problem nycaleksey Calibre 1 03-25-2010 11:42 PM
Additional CSS for conversion LARdT Calibre 6 02-18-2010 07:52 PM


All times are GMT -4. The time now is 11:45 AM.


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