print-column ^
prints the column
(-> (print-column [[:id.a {:data 100}] [:id.b {:data 200}]]
:data
#{})
(with-out-str))
print-compare ^
outputs a side by side comparison
(-> (print-compare [['hara.code [[:a :b :c] [:d :e :f]]]])
(with-out-str))
print-header ^
prints a header for the row
(defn print-header
[titles {:keys [padding columns] :as params}]
(let [pad (pad padding)
header (-> (apply str
(mapv (fn [title {:keys [align length]}]
(str pad
(justify align
(name title)
length)))
titles
columns))
(ansi/style #{:bold}))]
(println header)
(print "n")))
(-> (print-header [:id :name :value]
{:padding 0
:spacing 1
:columns [{:align :right :length 10}
{:align :center :length 10}
{:align :left :length 10}]})
(with-out-str))
print-row ^
prints a row to output
(-> (print-row ["hello" :world (result/result {:data [:a :b :c :d :e :f]
:status :info})]
{:padding 0
:spacing 1
:columns [{:align :right :length 10}
{:align :center :length 10}
{:align :left :length 10}]})
(with-out-str))
print-subtitle ^
prints the subtitle
(-> (print-subtitle "Hello Again")
(with-out-str))
print-summary ^
outputs the summary of results
(-> (print-summary {:count 6 :files 2})
(with-out-str))
print-title ^
prints the title
(-> (print-title "Hello World")
(with-out-str))
print-tree ^
outputs the result of `format-tree`
(print-tree '[{a "1.1"}
[{b "1.2"}
[{c "1.3"}
{d "1.4"}]]])
progress ^
creates a structure representing progress
(-> (progress) :state deref)
=> (contains {:total 100, :current 0, :label ""})
progress-string ^
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-update ^
updates the progress meter
(progress-update (progress) 10)