Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
simple bar chart for the command line
Ruby
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
barchart.rb
readme.md

readme.md

barchart_rb

simple command line bar chart inspired by (but simpler than) data_hacks.

single chart

$ echo "foo 1
> bar 8
> goo 14" | ruby barchart.rb

foo [ 1] *
bar [ 8] ********
goo [14] **************

multi-chart

$ echo "a.foo 1
> a.bar 8
> a.goo 14
> b.foo 445
> b.bar 78
> b.goo 13" | ruby barchart.rb

# A
foo [ 1] *
bar [ 8] ********
goo [14] **************

# B
# each * represents a count of 6
foo [445] **************************************************************************
bar [ 78] *************
goo [ 13] **
Something went wrong with that request. Please try again.