Skip to content

About

SBS-specific EPUB3 converter for the DAISY Pipeline

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

55 Commits

Folders and files

Repository files navigation

dtbook-to-ebook

SBS-specific EPUB3 converter for the DAISY Pipeline 2.

Converts DTBook XML to EPUB3 using the standard DAISY Pipeline dtbook-to-epub3 script, with SBS-specific preprocessing, CSS, and accessibility metadata layered on top as a thin wrapper module.

See ADR-0001 for the background and the decision to replace the old Nordic migrator fork with this module. See doc/Plan.org for the XSpec test strategy, regression test design, and phased development sequence.

Requirements

  • Java 8
  • Maven 3.5+

Build

mvn clean package

Test

mvn test

Run a single XSpec test:

mvn test -Dxspec.includes=**/addBoilerplate.xspec

Release

Updates the version number in the pom, tags the release (v<version>) and pushes. GitHub Actions then builds the .deb and attaches it to the GitHub release. Nothing is deployed to Maven Central.

export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
mvn release:clean release:prepare -DdryRun=true
mvn release:clean release:prepare

Architecture

The module is a single OSGi bundle that wraps the standard DAISY Pipeline dtbook-to-epub3 script. The SBS delta consists of:

  • 13 preprocessing XSLTs applied to the DTBook before conversion (boilerplate injection, footnote relocation, image ref wiring, etc.)
  • ~accessibility.css~ with SBS-specific visual adjustments
  • Post-processing for OPF accessibility metadata and content structure corrections
  • ~translations.xml~ for i18n boilerplate (Italian, Sursilvan)
DTBook
  └─▶ SBS preprocessing (13 XSLTs)
        └─▶ daisy:dtbook-to-epub3  (standard, upstream)
              └─▶ SBS post-processing (metadata, CSS injection)
                    └─▶ EPUB3

SBS Requirements

For the full list of SBS-specific requirements that this module implements, see doc/Requirements.org. Where the generated EPUBs deliberately differ from the old ones, see doc/Deviations.org.

Regression testing

scripts/compare-epub.bb compares EPUB output between two Pipeline instances (e.g. production vs. test). Modelled on dp2/scripts/compare-braille.bb.

./scripts/compare-epub.bb compare-epub-config.edn

Config format (compare-epub-config.edn):

{:prod-url   "https://pipeline.prod.example.com"
 :test-url   "https://pipeline.test.example.com"
 :token      "Token <your-jwt-token>"
 :output-dir "/tmp/epub-cmp"   ; optional
 :limit      100}              ; optional

About

SBS-specific EPUB3 converter for the DAISY Pipeline

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages