innoconv.ext.index_terms

Scan documents for index terms.

Viewers may generate a list of words with links to locations in the documents. In order to achieve this a list of index terms is provided in the Manifest so viewers don’t have to scan the whole documents themselves. Also for every occurence of an index term in the text an ID is attached.

This extension modifies the AST.

Note

Index terms are not supported in custom pages.

class innoconv.ext.index_terms.IndexTerms(*args, **kwargs)[source]

Bases: innoconv.ext.abstract.AbstractExtension

Scan the documents for index terms.

process_element(elem, _)[source]

Respond to AST element.

pre_conversion(language)[source]

Remember current conversion language.

pre_process_file(path)[source]

Remember current path.

post_process_file(ast, title, content_type, section_type=None, short_title=None)[source]

Scan the AST.

manifest_fields()[source]

Add index_terms field to manifest.

start(output_dir, source_dir)

Conversion is about to start.

Parameters
  • output_dir (str) – Base output directory

  • source_dir (str) – Content source directory