innoconv.utils

Utility module.

innoconv.utils.to_ast(filepath, ignore_missing_title=False)[source]

Convert a file to abstract syntax tree using pandoc.

Parameters
  • filepath (str) – Path of file

  • ignore_missing_title (bool) – Accept missing title in source file

Return type

(list of dicts, str, str, str)

Returns

(Pandoc AST, title, short_title, section_type)

Raises
innoconv.utils.to_string(ast)[source]

Convert AST to string (handles String and Space only).

Parameters

ast (List) – Content AST.