iSAQB-customized conversion of asciidoc documents to pdf
Find a file
2019-02-22 12:45:04 +01:00
assets conversion in container works too… 2019-02-10 17:31:38 +01:00
documentation updated documentation (README) 2019-02-10 17:59:10 +01:00
odt-based-conversion move lots of stuff into the container - currently draft 2019-02-09 20:32:46 +01:00
pdf-theme Rename style/ to pdf-theme/ to be in line with the existing foundation-curriculum repo 2019-02-21 11:10:08 +01:00
.gitignore ignore generated example file 2019-01-28 16:22:33 +01:00
adoc2pdf.sh Make language and stage parameters for the adoc2pdf script 2019-02-22 12:45:04 +01:00
build-container.sh adoc2pdf.sh now functional with „upgraded“ container… 2019-02-10 17:15:10 +01:00
convert.sh Make language and stage parameters for the adoc2pdf script 2019-02-22 12:45:04 +01:00
Dockerfile conversion in container works too… 2019-02-10 17:31:38 +01:00
example.adoc renamed extension to adoc 2019-02-02 16:32:06 +01:00
README.md Make language and stage parameters for the adoc2pdf script 2019-02-22 12:45:04 +01:00

Docker based conversion from AsciiDoc to PDF for iSAQB curricula

Native transformation using asciidoc-pdf

We convert from asciidoc to pdf using the AsciiDoctor-PDF utility, embedded into a Docker container.

As a prerequisite, you need to build the container.

./build-container.sh

Usage

You have two options - one with some interactivity

command-line configuration: adoc2pdf.sh

Call the adoc2pdf.sh script from the command line with the input filename (full path) as parameter, for example:

$./adoc2pdf.sh /Users/gstarke/projects/isaqb/foundation/curriculum-foundation.adoc

The default language being rendered is English. To explicitly define the language for which a document should be created you can use a second command line parameter with a language code, for example:

$./adoc2pdf.sh /Users/gstarke/projects/isaqb/foundation/curriculum-foundation.adoc DE

The default stage is dev and will include remarks from reviewers. To explicitly define the stage 'prod' you can use a third command line parameter:

$./adoc2pdf.sh /Users/gstarke/projects/isaqb/foundation/curriculum-foundation.adoc DE prod

interactive configuration: convert.sh

Call the convert.sh script from the command line with

$./convert.sh /Users/gstarke/projects/isaqb/foundation/curriculum-foundation.adoc

This will start an interactive shell in the container, giving you several additional options to configure, see figure below:

How it works

The main script is configure-and-convert-in-container.sh, which is located in ./assets. That script is copied into the Docker container during the build process and is its ENTRYPOINT.

  1. At first you need to build the container. There's a build-container.sh script prepared for you.
  2. You have two options to convert asciidoc files (see above). The convert.sh (see above) gives you some flexibility without forcing you to edit script files.
  3. Both scripts run the Docker container, mapping several local directories to paths within the container:
    • /build is where the output of the conversion is written
    • /pdf-theme is where the pdf theme is located.
    • /documents is where asciidoctor-pdf expects your asciidoc input file
  4. During the conversion, the output pdf is created in /build.

PDF Styling

We customized a theme mimicking the original iSAQB documents (minus special fonts).

See the AsciiDoctor pdf guide for extensive documentation on styling options.

For conversion to pdf we use our custom pdf theme, named isaqb-theme.yml. This theme is located in:

./pdf-theme

Requirements

The scripts and container are tailored around some specific requirements:

  • convert documents written in several (at least EN and DE) languages
  • distinguish between development (dev) and production (prod) versions of the target documents: dev versions need to contain comments and remarks, which are contained within the asciidoc source documents.

ODT-based Conversion

There's a folder (odt-based-conversion) which contains early experiments with a conversion process based upon OpenOffice.

In case anybody with OpenOffice experience feels eager enough to finish this experiment - great honor would fall upon you. All others can safely ignore this folder...

This work has been initiated by the Foundation Level Working Group of the iSAQB e.V., a non-profit organization to advance the area of software architecture.

Initially created by Peter Götz and Gernot Starke.