mirror of
https://github.com/tonsky/FiraCode.git
synced 2024-10-04 00:31:49 +03:00
Added progress to showcases
This commit is contained in:
parent
e7d9385716
commit
e9f9cd3b76
2
AUTHORS
2
AUTHORS
@ -7,4 +7,4 @@
|
|||||||
|
|
||||||
Mozilla Foundation (https://www.mozilla.org/en-US/contact/)
|
Mozilla Foundation (https://www.mozilla.org/en-US/contact/)
|
||||||
Telefonica S.A.
|
Telefonica S.A.
|
||||||
Nikita Prokopov (prokopov@gmail.com) github.com/tonsky
|
Nikita Prokopov (niki@tonsky.me) github.com/tonsky
|
||||||
|
@ -307,17 +307,18 @@ _| |_ _||_ __| ___| |__ |___
|
|||||||
|
|
||||||
# Progress bars
|
# Progress bars
|
||||||
|
|
||||||
[>----------]
|
[...........] [-----------]
|
||||||
[=>---------]
|
[#..........] [>----------]
|
||||||
[==>--------]
|
[##.........] [=>---------]
|
||||||
[===>-------]
|
[###........] [==>--------]
|
||||||
[====>------]
|
[####.......] [===>-------]
|
||||||
[=====>-----]
|
[#####......] [====>------]
|
||||||
[======>----]
|
[######.....] [=====>-----]
|
||||||
[=======>---]
|
[#######....] [======>----]
|
||||||
[========>--]
|
[########...] [=======>---]
|
||||||
[=========>-]
|
[#########..] [========>--]
|
||||||
[==========>]
|
[##########.] [=========>-]
|
||||||
|
[###########] [==========>]
|
||||||
|
|
||||||
# Sanity check
|
# Sanity check
|
||||||
|
|
||||||
|
20
script/progress.clj
Executable file
20
script/progress.clj
Executable file
@ -0,0 +1,20 @@
|
|||||||
|
#! bb
|
||||||
|
|
||||||
|
(def chars ["\uee06" "\uee07" "\uee08" "\uee09" "\uee0a" "\uee0b"])
|
||||||
|
|
||||||
|
(loop [i 0]
|
||||||
|
(print
|
||||||
|
(str
|
||||||
|
\u001b \u000d ;; ESC CR Moves the cursor to column zero
|
||||||
|
(if (= 0 i) \uee00 \uee03) ;; Progress start
|
||||||
|
(str/join
|
||||||
|
(for [j (range 2 17)]
|
||||||
|
(if (<= j i) \uee04 \uee01)))
|
||||||
|
(if (= 17 i) \uee05 \uee02)
|
||||||
|
" "
|
||||||
|
(nth chars (mod i 6))
|
||||||
|
" "
|
||||||
|
(-> i (/ 17.0) (* 100) (int)) "% "))
|
||||||
|
(flush)
|
||||||
|
(Thread/sleep 200)
|
||||||
|
(recur (mod (inc i) 18)))
|
Loading…
Reference in New Issue
Block a user