Skip to content

LibbyLi667/document-worker

 
 

Repository files navigation

Data Stewardship Wizard Document Worker

GitHub release (latest SemVer) Docker Pulls Document Worker CI GitHub

Worker for assembling and transforming documents

Dependencies

Templates

We are using HTML Jinja2 templates described by a JSON file within specified directory. The JSON file can look like this:

{
    "uuid": "4bfe909b-7dbc-40a7-8609-085e9af1df98",
    "name": "My cool template",
    "rootFile": "my/relative/dir/index.html.j2",
    "wkhtmltopdf": "",
    "pandoc": ""
}

The wkhtmltopdf and pandoc fields are optional and you can specify extra command line options and arguments for calls of those commands for converting document. Path specified in rootFile is relative to JSON file, then paths in Jinja2 are relative to the root file.

Docker

Docker image is prepared with basic dependencies and worker installed. It is available though Docker Hub: datastewardshipwizard/document-worker.

Build image

You can easily build the image yourself:

$ docker build . -t docworker:local

Mount points

  • /app/config.yml = configuration file (see example)
  • /app/templates = directory with templates
  • /usr/share/fonts/<type>/<name> = fonts according to Debian wiki (for wkhtmltopdf)

Fonts

We bundle Docker image with default fonts (for PDF generation, see fonts folder):

License

This project is licensed under the Apache License v2.0 - see the LICENSE file for more details.

About

Data Stewardship Wizard worker for assembling and transforming documents

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 98.4%
  • Dockerfile 1.6%