From bd55ee339c858c349f02fffe3c277da02a96cd62 Mon Sep 17 00:00:00 2001 From: Darren Burns Date: Mon, 28 Mar 2022 10:11:22 +0100 Subject: [PATCH] Update docs with info on SVG exports --- docs/source/console.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/source/console.rst b/docs/source/console.rst index ed4b6c46f..e890f2001 100644 --- a/docs/source/console.rst +++ b/docs/source/console.rst @@ -249,12 +249,12 @@ If Python's builtin :mod:`readline` module is previously loaded, elaborate line Exporting --------- -The Console class can export anything written to it as either text or html. To enable exporting, first set ``record=True`` on the constructor. This tells Rich to save a copy of any data you ``print()`` or ``log()``. Here's an example:: +The Console class can export anything written to it as either text, svg, or html. To enable exporting, first set ``record=True`` on the constructor. This tells Rich to save a copy of any data you ``print()`` or ``log()``. Here's an example:: from rich.console import Console console = Console(record=True) -After you have written content, you can call :meth:`~rich.console.Console.export_text` or :meth:`~rich.console.Console.export_html` to get the console output as a string. You can also call :meth:`~rich.console.Console.save_text` or :meth:`~rich.console.Console.save_html` to write the contents directly to disk. +After you have written content, you can call :meth:`~rich.console.Console.export_text`, :meth:`~rich.console.Console.export_svg` or :meth:`~rich.console.Console.export_html` to get the console output as a string. You can also call :meth:`~rich.console.Console.save_text`, :meth:`~rich.console.Console.save_svg`, or :meth:`~rich.console.Console.save_html` to write the contents directly to disk. For examples of the html output generated by Rich Console, see :ref:`appendix-colors`.