std.print.format.report
lines:elements
added in 3.0
(lines:elements arr {:keys [align length]} padding spacing)layout an array of elements as a series of rows of a given length
(lines:elements “A” “BC” “DEF” “GHIJ” “KLMNO” {:align :left :length 9} 0 1) => ["A BC DEF" " GHIJ " " KLMNO "]
lines:row
added in 3.0
(lines:row row {:keys [padding columns], :as params})same as row-elements but allows for colors and results
(lines:row [“hello” :world :a :b :c :d] {:padding 0 :spacing 1 :columns {:align :right :length 10} {:align :center :length 10} {:align :left :length 10}})
=> [" hello" " " " :world " " " [":a :b :c " " :d "]]
lines:row-basic
added in 3.0
(lines:row-basic row {:keys [padding spacing columns], :as params})layout raw elements based on alignment and length properties
(lines:row-basic [“hello” :world :a :b :c :d :e :f] {:padding 0 :spacing 1 :columns {:align :right :length 10} {:align :center :length 10} {:align :left :length 10}}) => [" hello" " :world " [“:a :b :c " " :d :e :f”]]
report:bold
added in 3.0
(report:bold text)prints the subtitle
(report:bold “Hello Again”)
report:column
added in 3.0
(report:column items name color)prints the column
(report:column [:id.a {:data 100} :id.b {:data 200}] :data #{})
report:header
added in 3.0
(report:header keys {:keys [padding columns], :as params})prints a header for the row
(report:header :id :name :value {:padding 0 :spacing 1 :columns {:align :right :length 10} {:align :center :length 10} {:align :left :length 10}})
report:row
added in 3.0
(report:row row params)prints a row to output
(report:row [“hello” :world (res/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}})
=> “hello :world [34m[:a :b :c [0m\n 34m :d :e :f[0m”
report:title
added in 3.0
(report:title title)prints the title
(report:title “Hello World”)