innoconv.ext.abstract

Base class for all other extensions.

The AbstractExtension is not instantiated directly but serves as super-class to all extensions.

class innoconv.ext.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’s used to display a brief summary.

classmethod helptext()[source]

Return a brief summary of what the extension is doing.

extension_list(extensions)[source]

Receive list of active extension instances.

Parameters

extensions (list) – List of all active extension instances

start(output_dir, source_dir)[source]

Conversion is about to start.

Parameters
  • output_dir (str) – Base output directory

  • source_dir (str) – Content source directory

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)

post_conversion(language)[source]

Conversion of a single language folder finished.

Parameters

language (str) – Language that is currently being converted.

finish()[source]

Conversion finished.