Add progress bars
This commit is contained in:
parent
2a8dab805e
commit
ddd9bf0b29
3 changed files with 46 additions and 0 deletions
6
demo.ss
6
demo.ss
|
@ -8,6 +8,7 @@
|
|||
:dlozeve/fancy/format
|
||||
:dlozeve/fancy/table
|
||||
:dlozeve/fancy/rule
|
||||
:dlozeve/fancy/progress
|
||||
:dlozeve/fancy/spinner)
|
||||
|
||||
(def (main)
|
||||
|
@ -30,6 +31,11 @@ culpa qui officia deserunt mollit anim id est laborum."))
|
|||
(display (table-footer tab))
|
||||
(displayln)
|
||||
(displayln)
|
||||
(def pbar (progress-bar 100 "[green]Progress: " percent: #f style: 'line))
|
||||
(for ((i (in-range 100)))
|
||||
(display (progress pbar (1+ i)))
|
||||
(thread-sleep! 0.05))
|
||||
(displayln)
|
||||
(for ((i (in-range 20)))
|
||||
(display (spinner i "[yellow]Waiting:" (format "(computing ~d/20)" (1+ i))
|
||||
style: 'dots))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue