trivelop @rrrene on

Sparkr 0.2.0 released

Sparkr is a port of spark for Ruby.

It lets you create ASCII sparklines for your Ruby CLIs: ▁▂▃▅▇

Install via rubygems

$ gem install sparkr

You can get/browse the source code at http://github.com/rrrene/sparkr

Shell meets …

After the installation, run sparkr in your shell of choice and pass it a list of numbers (just like you would with spark).

The output is what you would expect:

$ sparkr 0 30 55 80 33 150
▁▂▃▅▂▇

Ruby integration

But the real reason for this port is the ability to use this in a Ruby application, namely your personal CLI projects.

Sparkr.sparkline([0,30,55,80,33,150])
# => "▁▂▃▅▂▇"

Head over to GitHub for the source code. To contribute, just fork it!

Fork me on GitHub