diff --git a/CHANGELOG.md b/CHANGELOG.md index 5bbe127ea..5adc3993e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1690,7 +1690,8 @@ Major version bump for a breaking change to `Text.stylize signature`, which corr - First official release, API still to be stabilized -[unreleased]: https://github.com/willmcgugan/rich/compare/v12.0.1...HEAD +[unreleased]: https://github.com/willmcgugan/rich/compare/v12.1.0...HEAD +[12.1.0]: https://github.com/willmcgugan/rich/compare/v12.0.1...v12.1.0 [12.0.1]: https://github.com/willmcgugan/rich/compare/v12.0.0...v12.0.1 [12.0.0]: https://github.com/willmcgugan/rich/compare/v11.2.0...v12.0.0 [11.2.0]: https://github.com/willmcgugan/rich/compare/v11.1.0...v11.2.0 diff --git a/docs/source/console.rst b/docs/source/console.rst index 585c2be38..ba4ba2180 100644 --- a/docs/source/console.rst +++ b/docs/source/console.rst @@ -261,18 +261,15 @@ For examples of the html output generated by Rich Console, see :ref:`appendix-co Exporting SVGs ^^^^^^^^^^^^^^ -When using :meth:`~rich.console.Console.export_svg` or :meth:`~rich.console.Console.save_svg`, the width of the generated SVG will -match the width (in terms of character cells) of your terminal window. The height of the exported SVG will scale automatically to accommodate the console output. +When using :meth:`~rich.console.Console.export_svg` or :meth:`~rich.console.Console.save_svg`, the width of the SVG will match the width of your terminal window (in terms of characters), while the height will scale automatically to accommodate the console output. -The generated SVG can be viewed inside any web browser, and can be included on a webpage either by directly including the SVG markup -or by referencing the file itself using an ```` tag. For finer control over the dimensions, you'll have to use an ```` tag. +You can open the SVG in a web browser. You can also insert it in to a webpage with an ```` tag or by copying the markup in to your HTML. The image below shows an example of an SVG exported by Rich. .. image:: ../images/svg_export.svg -You can customise the theme used during SVG export by importing the desired theme from the :mod:`rich.terminal_theme` module and passing it to -:meth:`~rich.console.Console.export_svg` or :meth:`~rich.console.Console.save_svg` via the ``theme`` parameter:: +You can customize the theme used during SVG export by importing the desired theme from the :mod:`rich.terminal_theme` module and passing it to :meth:`~rich.console.Console.export_svg` or :meth:`~rich.console.Console.save_svg` via the ``theme`` parameter:: from rich.console import Console @@ -281,8 +278,7 @@ You can customise the theme used during SVG export by importing the desired them console = Console(record=True) console.save_svg("example.svg", theme=MONOKAI) -Alternatively, you can create your own theme by constructing a :class:`rich.terminal_theme.TerminalTheme` instance -yourself and passing that in. +Alternatively, you can create a them of your own by constructing a :class:`rich.terminal_theme.TerminalTheme` instance yourself and passing that in. Error console ------------- @@ -299,7 +295,7 @@ You might also want to set the ``style`` parameter on the Console to make error File output ----------- -You can also tell the Console object to write to a file by setting the ``file`` argument on the constructor -- which should be a file-like object opened for writing text. You could use this to write to a file without the output ever appearing on the terminal. Here's an example:: +You can tell the Console object to write to a file by setting the ``file`` argument on the constructor -- which should be a file-like object opened for writing text. You could use this to write to a file without the output ever appearing on the terminal. Here's an example:: import sys from rich.console import Console @@ -309,7 +305,7 @@ You can also tell the Console object to write to a file by setting the ``file`` console = Console(file=report_file) console.rule(f"Report Generated {datetime.now().ctime()}") -Note that when writing to a file you may want to explicitly the ``width`` argument if you don't want to wrap the output to the current console width. +Note that when writing to a file you may want to explicitly set the ``width`` argument if you don't want to wrap the output to the current console width. Capturing output ---------------- diff --git a/pyproject.toml b/pyproject.toml index c9f22e5cc..45bb0749c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ name = "rich" homepage = "https://github.com/willmcgugan/rich" documentation = "https://rich.readthedocs.io/en/latest/" -version = "12.0.1" +version = "12.1.0" description = "Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal" authors = ["Will McGugan "] license = "MIT"