Expand description
Exporting rendered output to HTML.
Port of rich/console.py’s export_html + the _export_format.py template.
Turns a recorded stream of Segments (captured via
Console::export_html) into a
self-contained HTML document, using a TerminalTheme to resolve colors.
Scope: inline_styles (each span carries its own style="…"). The CSS-class
variant is a follow-up (see docs/DIVERGENCES.md).
Functions§
- export_
html_ classes - Render
segmentsto a self-contained HTML document using CSS classes and a generated stylesheet. Port ofConsole.export_html(inline_styles=False)(upstream’s default). Distinct styles are numbered.r1,.r2, … in the order first seen. - export_
html_ inline - Render
segmentsto a self-contained HTML document with inline styles. Port ofConsole.export_html(inline_styles=True).