Show HN: Python lib for rich text, markdown, tables, etc. in the terminal
github.com
github.com
Colorama is just for cross platform colouring, blessings is a very elegant wrapper over curses which is still useful for not-fullscreen things, and urwid is a full-blown widget library for TUI stuff.
I was looking at Urwid (http://urwid.org/) last night for a new project. Urwid is a console user interface library for python.
Rich has already become my go-to tool for various Python stuff. I use these days Code's Python file with notebook cell comments. With this I can use console and Jupyter Notebook style rendering depending on wether I'm using regular IPython or Code's Interactive Window. I'm adapting my console printing to leverage Rich's features for Django querysets and other objects I'm dealing with. Rich gives me poor man's Jupyter Notebook widgets. Now I don't need to switch to ipynb files for browser based JS widgets much at all.
I have some daily reports generated by a python script via cron. The script currently outputs plaintext and the email just adds <pre> tags around the output, for formatting purposes. Some spicier formatting would be nice.
Here is an example of the output https://rich.readthedocs.io/en/latest/appendix/colors.html
See some screenshots:
https://yourlabs.io/oss/cli2/uploads/1bb0d9278047b4656f97ebb...
https://yourlabs.io/oss/cli2/uploads/8692ed0815082af8a903619...
Still working on the rendering part
Keep up the great work
Thanks for developing this.
I can get it working on both a shell Python and iPython console, but not in the PyCharm console.
This might be useful to integrate into pandas, BeautifulSoup etc
[1] https://unix.stackexchange.com/questions/501156/personalize-...
I like that it's cross platform and you can do very simple things or very complex formatting. This is super neat.