You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+20-40Lines changed: 20 additions & 40 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@
10
10
11
11
Progress indicators for command line Clojure apps, including support for indeterminate tasks (those where progress cannot be measured) and determinate tasks (those where progress can be measured). The former are represented using "spinners", while the latter are represented using "progress bars".
12
12
13
-
##What is it useful for?
13
+
#### Why?
14
14
15
15
To give the user of a command line app a visual progress indicator during long running processes.
16
16
@@ -25,6 +25,10 @@ Note that using Unicode characters in progress indicators may be unreliable, dep
25
25
26
26
`spinner` is available as a Maven artifact from [Clojars](https://clojars.org/com.github.pmonks/spinner).
27
27
28
+
## Usage
29
+
30
+
[API documentation is available here](https://pmonks.github.io/spinner/). The [unit](https://github.com/pmonks/spinner/blob/release/test/progress/indeterminate_test.clj)[tests](https://github.com/pmonks/spinner/blob/release/test/progress/determinate_test.clj) provide comprehensive usage examples (alternative animation sets, formatting, etc.).
Doesn't work properly, for the same reason the `clj` command line doesn't work properly (`rlwrap` intercepts the ANSI escape sequences emitted by this library and misinterprets them).
(println"And now something countably slow is happening...")
76
+
(let [a (atom0)]
77
+
(pd/animate! a :opts {:total1000000:redraw-rate60:style (:emoji-boxes pd/styles)}
78
+
(run! (fn [_] (Thread/sleep010) (swap! a inc)) (range1000000)))) ; Count up to a million, slowly
79
+
(println)
96
80
```
97
81
98
-
### API Documentation
99
-
100
-
[API documentation is available here](https://pmonks.github.io/spinner/). The [unit](https://github.com/pmonks/spinner/blob/release/test/progress/indeterminate_test.clj)[tests](https://github.com/pmonks/spinner/blob/release/test/progress/determinate_test.clj) provide comprehensive usage examples (alternative animation sets, formatting, etc.).
0 commit comments