generate_innodoc

This is the final step to generate innoDoc content from Mintmod input.

  • Load pandoc output from single JSON file.

  • Generate a section tree from headings.

  • Create a mapping between mintmod section IDs and section paths. (a)

  • Create a mapping between element IDs and section paths. (b)

  • Rewrite all links by using (a) and (b).

  • Save individual sections to innoDoc-specific directory structure.

  • Generate a manifest.yml.

  • Removes single JSON file.

class generate_innodoc.CreateMapOfIds(sections)[source]

Create a mapping between link IDs and section path.

create()[source]

Create map.

class generate_innodoc.CreateMapOfSectionIds(sections)[source]

Create mapping between mintmod section id and section path.

get_map()[source]

Generate section map.

class generate_innodoc.ExtractSectionTree(nodes, level)[source]

Generate section tree from a flat document structure.

create_section()[source]

Save a section.

get_tree()[source]

Generate and return tree.

class generate_innodoc.GenerateInnodoc(debug=False)[source]

Main class for generate_innodoc postflight filter.

LANGKEY = 'languages'

Languages key in manifest.yml

main()[source]

Post-flight script entry point.

update_manifest(title, outdir)[source]

Update manifest.yml file.

If it doesn’t exist it will be created.

generate_innodoc.MAX_LEVELS = 3

Max. depth of headers to consider when splitting sections

Postprocess all links to work with new section structure.

process()[source]

Rewrite links.

class generate_innodoc.WriteSections(sections, outdir_base, output_format)[source]

Write sections to individual files and remove content from TOC tree.

PANDOC_TIMEOUT = 120

Timeout for pandoc process

write_sections()[source]

Write all sections.