Project

spark_rb

0.0
No commit activity in last 3 years
No release in over 3 years
Ruby "port" of Zach Holman's Spark. For the sake of Rubygems packaging & better integration
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.6.4
>= 0
~> 0.6.0
 Project Readme

spark

A simple Ruby port of https://github.com/holman/spark.

Usage

Ruby:

require 'spark'
Spark.draw(1,2,3,4,5,6,7,8) # => "▁▂▃▄▅▆▇█"

Shell:

pjk@desktop:~$ sparkdraw 1,5,7,3,7,3
▁▅█▃█▃
pjk@desktop:~$ curl http://earthquake.usgs.gov/earthquakes/catalogs/eqs1day-M1.txt --silent |    sed '1d' |   cut -d, -f9 |   sparkdraw
▁▁▁▂▂▁▂▁▁▄▄▆▁▁▁▁▁▆▂▁▁▁▆▂▂▁▆▁▁▂▁▂▂▁▁▂▁▆▂▁▆▁▁▁▁▂▁▁▁▂▁▁▂▂▂▁▁▂▁▁▁▂▁▂▄▁▁▁█▂▁▂▂█▁▂▁▁▁▁
pjk@desktop:~$ sparkdraw 2 4 8 16 32 64 128
▁▁▁▁▂▄█

== Copyright

Copyright (c) 2011 Pavel Kalvoda. See LICENSE.txt for further details.