Static file¶
pip install kpireport-static
API¶
- class kpireport_static.StaticOutputDriver(report: kpireport.report.Report, **kwargs)¶
Bases:
kpireport.output.OutputDriver
Export a report’s contents to disk.
- output_dir¶
the directory to output the report contents to. (Default “./_build”)
- Type
str
- output_format¶
The output format, which can be one of “html” or “png”. (Default “html”.) Depending on the format, the output will have a few different forms:
- Html
The HTML report will be outputted in a new directory in the output path, named after the report. A “latest” directory will also be outputted/updated with the contents of this report.
- Png
The report will be rendered as a single PNG image named after the report in the output path, and a “latest” PNG will also be outputted.
Note
wkhtmltopdf
is required if using PNG output. You will probably also need to installXvfb
if using a Docker container that doesn’t already have an X server packaged.- Type
str
Changelog¶
0.1.1¶
Bug Fixes¶
Fixes an issue where relative font sizes would not be rendered accurately when using the PNG output format.
Fixes issue with PNG output when no X server is installed; imgkit will fail because wkhtmltoimage requires an X server to capture the output. Xvfb is already supported as a workaround; if this is installed on the host, configure imgkit to use it.
0.1.0¶
New Features¶
A new
output_path
option is now available and can be used to instruct the plugin to output a rendered PNG file instead of the default HTML contents. PNG output requires thewkhtmltopdf
binary to be installed on the host.
0.0.1¶
Prelude¶
Initial commit.
New Features¶
Initial commit.