Add Rich-based SVG Rendering for program-output
This PR introduces the ability to render program output using Rich in an SVG format. When Rich mode is active, the output is styled with colors and formatting, resulting in a nicer visual appearance compared to a standard literal block.
How It Works
-
Global Enable: Set
programoutput_force_rich = Truein yourconf.pyto force Rich for all directives. -
Per Directive: Use the
:rich:option on a.. program-output::directive. -
Width and Colors: Rich respects environment variables like
COLUMNS(to set the console width) andFORCE_COLOR(to force ANSI colors).
Example Usage
.. command-output:: python -m rich
:rich:
PS: in addition I upgraded pyproject.toml and removed setup.py
I can't review this PR as is, it contains many unnecessary changes (removal of setup.py, formatting and commenting changes, etc, etc, etc). Please provide a PR with only the necessary changes.
I apologize for the messy implementation. I truly believe that every change adds value. Ideally, I would have separated these into different pull requests, but I simply don't have the time right now.
I completely understand if you decide not to merge this, but perhaps others might find the feature useful.
moved to https://github.com/mgaitan/richterm