2021-04-10 18:40:37 +03:00
|
|
|
#! bb
|
|
|
|
|
|
|
|
(def chars ["\uee06" "\uee07" "\uee08" "\uee09" "\uee0a" "\uee0b"])
|
|
|
|
|
|
|
|
(loop [i 0]
|
|
|
|
(print
|
|
|
|
(str
|
2021-04-18 03:54:20 +03:00
|
|
|
\u001b \u000d " " ;; ESC CR Moves the cursor to column zero
|
|
|
|
|
|
|
|
;; normal
|
|
|
|
"["
|
|
|
|
(str/join
|
|
|
|
(for [j (range 2 17)]
|
|
|
|
(if (<= j i) "#" ".")))
|
|
|
|
"] "
|
|
|
|
(nth "|/-\\" (mod i 4))
|
|
|
|
" "
|
|
|
|
|
|
|
|
;; Fira Code
|
2021-04-10 18:40:37 +03:00
|
|
|
(if (= 0 i) \uee00 \uee03) ;; Progress start
|
|
|
|
(str/join
|
|
|
|
(for [j (range 2 17)]
|
|
|
|
(if (<= j i) \uee04 \uee01)))
|
|
|
|
(if (= 17 i) \uee05 \uee02)
|
2021-04-18 03:54:20 +03:00
|
|
|
" "
|
2021-04-10 18:40:37 +03:00
|
|
|
(nth chars (mod i 6))
|
|
|
|
" "
|
|
|
|
(-> i (/ 17.0) (* 100) (int)) "% "))
|
|
|
|
(flush)
|
|
|
|
(Thread/sleep 200)
|
|
|
|
(recur (mod (inc i) 18)))
|