innoconv.extensions.abstract¶
Base class for all other extensions.
The AbstractExtension is not meant to be instantiated directly.
-
class
innoconv.extensions.abstract.
AbstractExtension
(manifest)[source]¶ Abstract class for extensions.
The class all extensions inherit from. The to-be-implemented methods document the available events that are triggered during the conversion process.
Extension classes should have a
_helptext
attribute. It is shown in the CLI as a brief summary what the extension accomplishes.-
pre_conversion
(language)[source]¶ Conversion of a single language folder is about to start.
Parameters: language (str) – Language that is currently being converted.
-
pre_process_file
(path)[source]¶ Conversion of a single file is about to start.
Parameters: path (str) – Output path
-
post_process_file
(ast, title)[source]¶ Conversion of a single file finished. The AST can be modified.
Parameters: - ast (List of content nodes) – File content as parsed by pandoc.
- title (str) – Section title (localized)
-