Quote:
Originally Posted by Jellby
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.