Replies: 1 comment
-
Have a look in the rich-cli pager.py: https://github.com/Textualize/rich-cli/blob/main/src/rich_cli/pager.py |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I like the output of rich.Markdown and I would like to display it from my program using a pager.
In other circumstances I use click.echo_via_pager() for this, but it requires an iterable and the output of rich.Markdown is not an iterable.
Using the command line example:
python -m rich.markdown filename.md | less
works as expected, but I don't know how it works.I tried writing the output of rich.markdown to a file, but that still does not create an iterable that I can page from within my program.
Can this be done, and if so, how?
Beta Was this translation helpful? Give feedback.
All reactions