Skip to content

sbsdev/dtbook-to-ebook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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 doc/Architecture_Decision_Records.org 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

Architecture

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

  • 14 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 (14 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.

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

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors