(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 ""})
(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 "
(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
(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) => "-"
(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 -"
(progress-test)
demo for how progress should work
(progress-test)
demo for how progress should work (progress-test)
(progress-update progress)
(progress-update progress number)
updates the progress meter
(progress-update (progress) 10)
updates the progress meter (progress-update (progress) 10)
(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 ====="
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close