Posts in May, 2020

Since my last post on Rich there have been a number of improvements. Here are the major highlights:

Progress bars now have an indeterminate state which displays a pulsing animation. This a fairly common thing from graphical UIs, here's what it looks like in the terminal:

To see it in action install Rich and run the following:

Or just watch this video.

You can use this new state to show when something is working, but before you know how many 'steps' are involved. For instance, when making a request over the internet, you won't know how many bytes you have to download until you get a response. Rather than show a progress bar at 0% you can show this pulse effect while waiting on the server. continue reading…

Since releasing Rich 1.0.0 I've discovered that terminals support hyperlinks. And I don't mean the helpful highlighting of URLs that most terminals do, I mean actual HTML-like hyperlinks that launch a browser.

This was news to me, as I've never seen this feature in the wild. I just had to add it to Rich. The easiest way to output hyperlinks is via console markup. Here's a simple example:

This will output the text "Visit my blog!" in the terminal where the word "blog" is a clickable link that opens the browser.

This is a relatively new (2017) addition to the spec, so it isn't supported on all terminal apps. If your terminal doesn't support hyperlinks then the link won't be clickable, but you will see the text as normal.

I'm happy to announce the release of version 1.0.0 of Rich - my Python library for fancy terminal rendering.

Rich is a project I started back in October 2019 when I was staying in Wuhan, a few weeks before it was locked down. Back then it was a toy project designed to pass the time while traveling. In the spirit of XKCD 927 I wanted to create a library that could display rich content in the terminal as effortlessly as you can with HTML. continue reading…