Test

clojure-spinners

Various spinners for Clojure.
The built-in spinners are coming from cli-spinners and the implementation is designed to be (somewhat) compatible with clj-commons/spinner

Usage

The following 3 steps are needed to run spinners. - create a spinner instance by create! - start the spinner by start! - stop it by stop!

Here is a simple example.

(let [opts {:spinner :hearts
            :text "Hearts!!"}
      s (create! opts)]
  (start! s)
  (Thread/sleep 2000)
  (stop! s))

That can also be done with spin!.

(spin! {:text "Spin with spin!"}
       (Thread/sleep 2000))

You can find more examples here.

Character width

You can use any unicode chars.
The width of them are calculated based on the following document.

https://www.unicode.org/Public/UCD/latest/ucd/EastAsianWidth.txt
(Top page: https://www.unicode.org/reports/tr11/)

Note that all chars defined as “Ambiguous” are handled as half width characters.
Basically you don’t need to care about it, but might get unexpected output with them.

I’d like to thank all related works!!