diff --git a/README.md b/README.md index a6fc2a2d..fe0870d1 100644 --- a/README.md +++ b/README.md @@ -232,7 +232,7 @@ To try this out yourself, see [examples/downloader.py](https://github.com/willmc ## Status -For situations where it is hard to calculate progress, you can use the status method which will display a 'spinner' animation with a status message that won't prevent you from writing to the terminal. Here's an example: +For situations where it is hard to calculate progress, you can use the [status](https://rich.readthedocs.io/en/latest/reference/status.html) method which will display a 'spinner' animation and message. The animation won't prevent you from using the console as normal. Here's an example: ```python from time import sleep @@ -252,6 +252,16 @@ This generates the following output in the terminal. ![status](https://github.com/willmcgugan/rich/raw/master/imgs/status.gif) +The spinner animations were borrowed from [cli-spinners])https://www.npmjs.com/package/cli-spinners). You can select a spinner by specifying the `spinner` parameter when calling status(). Run the following command to see the available values: + +``` +python -m rich.spinner +``` + +The above command generate the following output in the terminal: + +![spinners](https://github.com/willmcgugan/rich/raw/master/imgs/spinners.gif) + ## Columns Rich can render content in neat [columns](https://rich.readthedocs.io/en/latest/columns.html) with equal or optimal width. Here's a very basic clone of the (MacOS / Linux) `ls` command which displays a directory listing in columns: diff --git a/imgs/spinners.gif b/imgs/spinners.gif new file mode 100644 index 00000000..b98685c2 Binary files /dev/null and b/imgs/spinners.gif differ