A command line tool to transform dtbook xml source files into a braille format proprietary to Swiss Library for the Blind, Visually Impaired and Print Disabled using Saxon with a java extension that offers translating text into braille using liblouis.
ant -e -lib /usr/share/java/jdeb.jar clean dist package
cd dtbook2sbsform
./dtbook2sbsform.sh dtbook.xml
calls saxon.sh
, transforms dtbook.xml
and performs line breaking
using linebreak.sh
printing output onto stdout.
./saxon.sh
calls saxon, offering its rich command line interface, includes our
extension function (see resources/xsl/dtbook2sbsform.xsl
).
./linebreak.sh
breaks lines according to sbs rules: only lines beginning with a blank will be broken. Line width is 80 chars.
./utfx.sh
Performs utfx (svn version) tests.
This project has been ported to support testing via xprocspec tests.
For legacy reasons however testing with utfx
is still supported via
a Docker image.
docker build -t dtbook2sbsform -f Dockerfile.test_with_utfx .
If you really want you can also build an image to test against old versions of liblouis and the braille tables:
docker build --build-arg LIBLOUIS_VERSION=3.10.2 --build-arg BRAILLE_TABLES_VERSION=1.12.5 -t dtbook2sbsform -f Dockerfile.test_with_utfx .
To run the tests using above image simply run
docker run --rm --volume=$(pwd):/usr/src/dtbook2sbsform -t dtbook2sbsform
To run a single test file use the following command:
docker run --rm --volume=$(pwd):/usr/src/dtbook2sbsform -t dtbook2sbsform -Dutfx.test.file=test_xsl/11_most_frequent_bugs_test.xml
Copyright 2011-2018 Swiss Library for the Blind, Visually Impaired and Print Disabled.
Licensed under GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.