Skip to content

sbsdev/dtbook2sbsform

 
 

Repository files navigation

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 liblouis-java bindings for translating text into braille using liblouis.

Build

Requires Java 21+.

mvn package

To install the resulting Debian package:

sudo apt reinstall ./target/dtbook2sbsform_*.deb

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.

Prerequisite installs

Release

  1. Bump the version in pom.xml (remove -SNAPSHOT, e.g. 0.36-SNAPSHOT0.36)
  2. Commit: git commit -m "Release 0.36"
  3. Tag: git tag v0.36
  4. Push the tag: git push origin v0.36

GitHub Actions will build the package, run the full test suite, and publish the .deb as a release asset automatically.

Afterwards bump pom.xml to the next snapshot version (e.g. 0.37-SNAPSHOT) and commit to continue development.

Testing

mvn test

To run a single XSpec file:

mvn test -Dtest="XSpecTest#run[src/test/xspec/FILENAME.xspec]"

All dependencies are on Maven Central — no local jar installs required.

License

Copyright 2011-2026 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.

About

Convert DTBook to SBSForm, an intermediate format to produce formatted braille

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • XSLT 82.8%
  • Java 15.3%
  • Shell 1.9%