CSS shiv on sending to device
I've read the post it and I'm ready to develop this functionality (which mean I'll have to learn a bit of python I guess, but it's fine).
One common problem I see for people who edit ebooks is how they deal with the lack of some specific css properties, and how they twist the HTML code to accomodate. Such examples are :before, :after, :first-letter and :first-of-type pseudo elements; but also font-variant: small-caps (tricky) and text-transform: uppercase.
I read on two devices: my Kobo e-reader and my computer (I use a browser plugin, which is very css friendly). I don't need trickery on the browser plugin, but I need it on the Kobo. Hence I was thinking that it would be nice if I could add a routine when I send books to my Kobo (I use Calibre to manage them) which automatically edit the ebooks to fit with the device deficiencies.
I have no idea if such thing would be categorized as plugin or recipe or editor or conversion (I'm a little bit confused by the categories here). I'm writing to see if someone more experienced already know if it's not feasible, or some quick tips about what I would need to import from Calibre library (I'd need to be able to know how to insert my code in the "send book to device" routine, how to get the device type, and if there's a javascript-like DOM parser).
Pure regex solution is a no go (I know regex), I need DOM.
Best regards.
|