returning to bookshare.org topic

Linux for blind general discussion blinux-list at redhat.com
Sat Jul 1 21:33:48 UTC 2017


With Bookshare books, when you unzip them, you have a pile of
files.  One is the xml file, the content of the book.  There's another
one, named daisyTransform.xsl.
You can use that xsl file to turn the xml into html, with xsltproc:

xsltproc daisyTransform.xsl Book.xml > Book.html

The xsltproc command is probably in a package named libxslt or something
similar.

I wrote a little script to convert html to text with elinks, using all
the options and settings I prefer.  It also produces output in UTF-8, so
Unicode characters are faithfully preserved.
http://the-brannons.com/useful-scripts/cmb-html2txt
By default, elinks indents everything by 3 spaces, which is kind of
annoying.  So you'll want the line

    set document.browse.margin_width = 0

in your config file, either /etc/elinks/elinks.conf or
$HOME/.elinks/elinks.conf.
If there's an existing document.browse.margin_width line, just modify
that one.

Good luck,
-- Chris




More information about the Blinux-list mailing list