A namespace for generating textual progress bars in a functional way.
A namespace for generating textual progress bars in a functional way.
A map of default options for the render function.
A map of default options for the render function.
(done bar)
Return a new progress bar that has been marked as 'done'.
Return a new progress bar that has been marked as 'done'.
(print bar)
(print bar options)
Prints a progress bar, overwriting any existing progress bar on the same line. If the progress bar is done, a new line is printed.
Prints a progress bar, overwriting any existing progress bar on the same line. If the progress bar is done, a new line is printed.
(progress-bar total)
Create an immutable data structure representing a progress bar for the specified total.
Create an immutable data structure representing a progress bar for the specified total.
(render bar)
(render {:keys [progress total] :as bar} options)
Render a progress bar as a string. Takes an optional map of profiles, which connects state keywords to maps of display options. The following display options are allowed:
:format - a format string for the progress bar :length - the length of the bar :complete - the character to use for a completed chunk :incomplete - the character to use for an incomplete chunk
The format string determines how the bar is displayed, with the following subsitutions:
:bar - the progress bar itself :progress - the number of complete items :total - the total number of items :percent - the percentage done :elapsed - the elapsed time in minutes and seconds :remaining - the estimated remaining time in minutes and seconds
Render a progress bar as a string. Takes an optional map of profiles, which connects state keywords to maps of display options. The following display options are allowed: :format - a format string for the progress bar :length - the length of the bar :complete - the character to use for a completed chunk :incomplete - the character to use for an incomplete chunk The format string determines how the bar is displayed, with the following subsitutions: :bar - the progress bar itself :progress - the number of complete items :total - the total number of items :percent - the percentage done :elapsed - the elapsed time in minutes and seconds :remaining - the estimated remaining time in minutes and seconds
(tick bar)
(tick bar amount)
Return a new progress bar that has been incremented by the supplied amount, or by 1, if no amount was supplied.
Return a new progress bar that has been incremented by the supplied amount, or by 1, if no amount was supplied.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close