Skip to content

Latest commit

 

History

History
102 lines (73 loc) · 3.07 KB

README.org

File metadata and controls

102 lines (73 loc) · 3.07 KB

dtbook2sbsform

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.

Build

ant -e -lib /usr/share/java/jdeb.jar clean dist package

Usage of command line tools

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.

Dependencies

Prerequisite installs

  • java
    • Unfortunately this project is not compatible with Java 8. Please use Java 7 or lower.
  • liblouis

Testing

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

Authors

Christian Egli

Bernhard Wagner

License

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.