Liking cljdoc? Tell your friends :D

hara.print.base.progress


+progress-defaults+clj


progressclj

(progress)
(progress initial)
(progress initial options)

creates a structure representing progress

(-> (progress) :state deref) => (contains {:total 100, :current 0, :label ""})

creates a structure representing progress

(-> (progress) :state deref)
=> (contains {:total 100, :current 0, :label ""})
raw docstring

progress-bar-stringclj

(progress-bar-string current total {:keys [width complete incomplete marker]})

converts a progress percentage to a string

(progress-bar-string 50 100 (:bar +progress-defaults+)) => "===================== 50/100 "

converts a progress percentage to a string

(progress-bar-string 50 100 (:bar +progress-defaults+))
=> "===================== 50/100                      "
raw docstring

progress-etaclj

(progress-eta total progress elapsed)

calculates the estimated time left for the task

(progress-eta 100 90 90) => 10

calculates the estimated time left for the task

(progress-eta 100 90 90)
=> 10
raw docstring

progress-spinner-stringclj

(progress-spinner-string current total)

converts a progress to a spinner string

(progress-spinner-string 9 20) => "-"

converts a progress to a spinner string

(progress-spinner-string 9 20)
=> "-"
raw docstring

progress-stringclj

(progress-string progress)
(progress-string {:keys [total current label] :as state}
                 {:keys [template bar] :as options})

creates a string representation of the current progress

(progress-string (-> @(:state (progress)) (update :update-time + 10) (update :current + 9)) +progress-defaults+) => "[===== 9/100 ] 101s -"

creates a string representation of the current progress

(progress-string (-> @(:state (progress))
                     (update :update-time + 10)
                     (update :current + 9))
                 +progress-defaults+)
=> "[=====                 9/100                       ] 101s -"
raw docstring

progress-testclj

(progress-test)

demo for how progress should work

(progress-test)

demo for how progress should work

(progress-test)
raw docstring

progress-updateclj

(progress-update progress)
(progress-update progress number)

updates the progress meter

(progress-update (progress) 10)

updates the progress meter

(progress-update (progress) 10)
raw docstring

replace-centerclj

(replace-center background text)

replaces the center of the background with text

(replace-center "=================" " hello ") => "===== hello ====="

replaces the center of the background with text

(replace-center "=================" " hello ")
=> "===== hello ====="
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close