ndwinton / shipkin-html-epub

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This is a "spike" on a Shipkin-HTML-to-ePub convertor. The code is of dubious quality and the output is not perfect.

NOTE: You will need HTML Tidy, pdf2svg and ghostscript installed and on your PATH in order to run the converter. These tools can be installed on a Mac using brew install. You will also need the zip command-line tool available.

To generate an ePub, first create a zip archive of the course content by running:

./gradlew zip -xcheckLinks -DpdfPresentations

in the relevant course directory (not in this project directory). This generates the zip file under the course build/archive directory.

Build the convertor tool here (using the normal ./gradlew build) and then run the tool as follows:

java -jar build/libs/shipkin-html-epub-0.1.jar <course-zip-file> <course-title>

The first parameter is the course zip file name and the second is the course title. So, if you have generated the archive for the Core Spring course and copied it to this directory, that would be:

java -jar build/libs/shipkin-html-epub-0.1.jar core-spring-course-1.10.0.zip 'Core Spring'

If all goes well this will create a build/epub directory (deleting any existing contents if the directory already exists). Within it will be an ePub file with the same name as the zip file and an .epub extension. So, for the example given above that would be core-spring-course-1.10.0.epub.

The ePub file can be validated with the epubcheck tool:

java -jar epubcheck.jar --error work/core-spring-course-1.10.0.epub

The --error option suppresses warnings, of which there are likely to be many, but there should be no errors or fatal messages.

About


Languages

Language:Groovy 100.0%