View Single Post
Old 09-14-2009, 12:37 PM   #14
frabjous
Wizard
frabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameter
 
frabjous's Avatar
 
Posts: 1,213
Karma: 12890
Join Date: Feb 2009
Location: Amherst, Massachusetts, USA
Device: Sony PRS-505
Wow, great job, Jellby. I had begin playing around with your epub-read script as a starting place, but I had a feeling you'd beat me to the punch.

Ahi, I haven't studied the script in too much detail, but it looks simpler still. It just extracts the (X)HTML source of the ePub, reads the contents of its spine and table of contents, and then processes those files in that order --- (you can include multiple files in a single PDF with Prince) -- adding only a CSS file that controls the page layout and some defaults (fonts, hyphenation pattern, etc.). (EDIT: oops... didn't see Jellby's reply...)

This seems to work well. Some notes though:

1. Dont' know what linux distro you're using, but dos2unix does not come standard on Ubuntu Jaunty; fixed by installing the tofrodos package. (Actually I did that earlier for your other script.)

2. Right now, if the CSS of the ePub chooses a different font/font size/justification setting, etc., it overrides the settings in default.css; this is perhaps as it should be, but a setting that would make default.css override these would be great. (This would be tougher to code, and perhaps dangerous in certain circumstances, depending its aggression level...)

3. Defaulting to a 9.9pt font seems a little small...

Some things that would be nice:
  • A port to something like python to make it a bit more platform-independent, though personally a bash script works fine for me.
  • A minimal GUI wrapper for editing default.css (or creating a new custom .css) in which you can choose page sizes (maybe even from a list of standard ones), borders, fonts, etc. I might work on this if no one else is interested. But maybe it's not worthwhile before it's ported. (Linux users may well be happy without one.)

Last edited by frabjous; 09-14-2009 at 12:53 PM.
frabjous is offline   Reply With Quote