View Single Post
Old 09-18-2009, 08:02 PM   #35
acidzebra
Liseuse Lover
acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.
 
acidzebra's Avatar
 
Posts: 869
Karma: 1035404
Join Date: Jul 2008
Location: Netherlands
Device: PRS-505
Quote:
Originally Posted by Jellby View Post
I've updated the script in post #11 again. I think it's a bit cleaner now, and two main improvements:

- It will use pdftk if available to set the author and title metadata of the PDF.

- It has another option, -S, equivalent to -s but with a higher priority. The stylesheet specified with -s is overriden (if there are conflicts) by the book-specific .css, if any. The stylesheet specified with -S will override anything (use !important to override the "author" styles, as usual).
Great script, some notes:

- I had to softlink /usr/bin/xmlstarlet to a /usr/bin/xml which the script seems to think is the name of the xmlstartlet program? (I'm on stock FC10, xmlstarlet from standard package repos). No big headache though.

- If I use the -S option it won't load my specified stylesheet, instead trying to load default.css - if that doesn't exist it throws an error (circumvented by renaming my style sheet default.css)

- the generated bookmarks seem odd at times.For some Calibre-generated epubs I got a multilevel TOC like
- <book name>
---<author>
------produced by calibre (version)

Other than that, it looks rather spiffy



I had some issues with it ignoring my css and defaulting to the book CSS, but forcing lots of !importants everywhere seems to solve it. Still, I would expect -S to override everything as per your previous post, but that doesn't seem to happen always.

Last edited by acidzebra; 09-18-2009 at 08:44 PM. Reason: I'm an idiot who should use the !important attribute in CSS
acidzebra is offline   Reply With Quote