Skip to content

ds-wizard/docworker-example-plugin

Repository files navigation

DSW Document Worker: Example Plugin

Example plugin for the DSW Document Worker.

Usage

This is just an example how to create a plugin for the DSW Document Worker.

  • plugin.py - contains hook implementations for the DSW Document Worker
  • step.py - contains a Step implementation for the DSW Document Worker

This plugin uses all three hooks:

  • Adds ExampleStep via provide_steps hook, this step results in plain text document containing static text as implemented in step.py.
  • Adds extra example field to the document context via enrich_document_context hook.
  • Adds example Jinja filter, test, and global variable via enrich_jinja_env hook.

It is important that pyproject.toml contains the following section:

[project.entry-points.dsw_document_worker_plugins]
example = 'dsw_docworker_example_plugin.plugin'

With the plugin (or eventually more plugins) ready, you can build a new Docker image while extending the base image with the plugin(s) and then run the DSW Document Worker with the new image as shown in Dockerfile.

License

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

About

Example plugin for the DSW Document Worker

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published