rsalmei / alive-progress

A new kind of Progress Bar, with real-time throughput, ETA, and very cool animations!
MIT License
5.53k stars 206 forks source link

Compact spinners ? #183

Closed stuaxo closed 2 years ago

stuaxo commented 2 years ago

Does alive_progress allow for compact spinners ?

I want something to animate while my service waits to connect to celery, I noticed that there are some hourglass emojis, alternating between the 3 would make it look like the sand was moving ⏳⌛ there's also the classic spinning slashes I guess /-|

rsalmei commented 2 years ago

Sure!

You could choose one ready to use from showtime (send its name in spinner argument):

from alive_progress.styles import showtime

showtime()

Or, you can even create your own! I've made several advanced tools to create and visualize custom spinners. For example, look at the radioactive spinner in showtime. If you wanted to use something like that sparkling circle, you could:

from alive_progress.animations.spinners import frame_spinner_factory
spark = frame_spinner_factory('∙○⦿●')

And call with it with the actual instance: with alive_bar(..., spinner=spark, ...) as bar:

You can also evaluate your creations! Behold:

image

Call .check(3) and you can even see it animating! Untitled

That's it, you have a lot more tools to generate whatever you need, read more details in the README here 👍

stuaxo commented 2 years ago

Thanks, there's a lot of good info there.

Heh, maybe in the future Unicode will add some more animation to the hour glass so it's easy to achieve something like the old turning hour glass on Windows 95.