fixml.modules.mixins

Classes

WriteableMixin

A mixin for classes which will write content to filesystem.

ExportableMixin

A mixin that provides functionality to export (dump) content as markdown,

Module Contents

class fixml.modules.mixins.WriteableMixin

A mixin for classes which will write content to filesystem.

_filedump_check(output_path: str, exist_ok: bool, expects_directory_if_exists: bool = False)
class fixml.modules.mixins.ExportableMixin

Bases: WriteableMixin, abc.ABC

A mixin that provides functionality to export (dump) content as markdown, then to convert it into HTML/PDF/Quarto documents.

Extends WriteableMixin.

This mixin relies on markdown representations of the object. The class including mixin must have .as_markdown() and .as_quarto_markdown() implemented.

export(output_path: str, exist_ok: bool = False)
abstract as_markdown() str
abstract as_quarto_markdown() str
static _escape_single_quotes(string: str) str
__format_check(output_path, format)
_export_check(output_path: str, format: str, exist_ok: bool)
export_html(output_path: str, exist_ok: bool = False)
export_pdf(output_path: str, exist_ok: bool = False)
export_quarto(output_path: str, exist_ok: bool = False)
export_markdown(output_path: str, exist_ok: bool = False)