reportcompiler.plugins.postprocessors.base
¶
base.py
This module includes the base plugin interface for postprocessors.
Classes¶
PostProcessor
: Plugin that implements the postprocessing stage for the document (see
-
class
reportcompiler.plugins.postprocessors.base.
PostProcessor
¶ Plugin that implements the postprocessing stage for the document (see architecture).
Inheritance
-
postprocess
(doc_param, doc_path, postprocessor_info, context)¶ Applies the postprocessing after the document has been rendered.
Parameters: - doc_param (OrderedDict) – Document variable
- doc_path (str) – Path of the document file generated by the template renderer
- postprocessor_info (dict) – Information about the current postprocessor (multiple can be used for fragment)
- context (dict) – Context dictionary with keys ‘data’ (context generated from fragments) and ‘meta’ (document metadata)
-
classmethod
raise_postprocessor_exception
(context, exception=None, message=None)¶ Returns a postprocessing exception with the necessary info attached.
Parameters: - context (dict) – Context for fragment
- exception (Exception) – Exception returned by metadata retrieval
- message (str) – Optional message for exception
Raises: PostProcessorError – always
-