Liking cljdoc? Tell your friends :D

progrock.core

A namespace for generating textual progress bars in a functional way.

A namespace for generating textual progress bars in a functional way.
raw docstring

default-render-optionsclj

A map of default options for the render function.

A map of default options for the render function.
sourceraw docstring

doneclj

(done bar)

Return a new progress bar that has been marked as 'done'.

Return a new progress bar that has been marked as 'done'.
sourceraw docstring

elapsed-timeclj

(elapsed-time {:keys [creation-time]})
source

percentclj

(percent {:keys [progress total]})
source

printclj

(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.
sourceraw docstring

progress-barclj

(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.
sourceraw docstring

remaining-timeclj

(remaining-time {:keys [progress total] :as bar})
source

renderclj

(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
sourceraw docstring

tickclj

(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.
sourceraw docstring

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

× close