Converting EPUB to DTBook

Forums: 

Anyone willing to help me get set up to convert some EPub to DTBook?

I got pretty far by myself:

  • pipeline2 v 1.8 installed and running
  • discovered https://github.com/nlbdev/nordic-epub3-dtbook-migrator , got it built
  • got it to compile & put its jar into pipeline/modules

Now I can attempt to run the validate and convert scripts, but they fail to run:

 

$ ./cli/dp2 help

[...]

nordic-epub3-to-dtbookTransforms an EPUB3 publication into DTBook according to the nordic markup guidelines.

 

nordic-epub3-validateValidates an EPUB3 publication according to the nordic markup guidelines.

 

$ ./cli/dp2 nordic-epub3-validate --x-epub ~/Documents/EPub/tom-sawyer.epub --x-strict=false  -o=dp.out

[DP2] Job with id 58aa7f3b-ef59-4142-b35e-73a4207394b8 submitted to the server

[WS] ERROR(1) - Cannot import: http://www.daisy.org/pipeline/modules/epubcheck-adapter/library.xpl

 

[DP2] ERROR

 

I'm uncertain how to fix this.  Is the epubcheck-adapter an additional requirement that must be installed somehow?

 

Thanks

 

Boris

 

Hi Boris.

I'm the main developer on the Nordic EPUB3/DTBook Migrator script.

I'm maintaining unofficial builds of the scripts here: https://dl.dropboxusercontent.com/u/6370535/nordic-epub3-dtbook-migrator/index.html

The latest version at the moment does not work with Pipeline 2 v1.8, but instead requires Pipeline 2 v1.7.

The migrator depends on epubcheck as part of its EPUB validation step, and the "epubcheck-adapter" you got an error about is the module that allows Pipeline 2 scripts to use epubcheck for EPUB validation. However, the latest release of epubcheck (3.0.1) depends on the XSLT library Saxon 9.4, while Pipeline 2 v1.8 is using Saxon 9.5, which made it impossible to use the latest release of epubcheck in Pipeline 2 v1.8.

I have a almost-working version of the migrator for Pipeline 2 v1.8 in the dev branch on github, but I have some more testing to do before it's ready to use. It depends on a couple more libraries than the current build as well. I suggest you either try out the builds I linked to above with Pipeline 2 v1.7, or if you wait a little while (at most a couple of weeks) I'll have a build that works with Pipeline 2 v1.8 ready.

Note that the migrator script is targeted at a very particular subset of EPUB3 though, and will probably not work with most EPUBs "in the wild". You would have to adapt your EPUB to the "Requirements for Quality Content Production in EPUB 3.0/XHTML", which I've just added a link to from the bottom of the project homepage here:

http://nlbdev.github.io/nordic-epub3-dtbook-migrator/

In the future we might fork the project and create a generic EPUB3-to-DTBook script. But we would first have to find a way to normalize all HTML documents etc. so that the content model is predictable before conversion (which it is in the nordic guidelines / content model). So don't expect a generic script in 2014.

Hope this helps. Let me know if you have any more questions or issues!

I've added a version that should work with Pipeline 2 v1.8 to https://dl.dropboxusercontent.com/u/6370535/nordic-epub3-dtbook-migrator/index.html now.