Print bar graphs in your shell.
bart takes a list of data and plots a chart with rectangular horizontal bars with lengths proportional to the values represented.
Clone this repository:
$ git clone git@github.com:arturoherrero/bart.git
Add bart/bin/
to your PATH
:
$ echo 'export PATH="${PATH}:path/to/bart/bin"' >> ~/.bash_profile
Source your profile:
$ source ~/.bash_profile
$ brew tap arturoherrero/formulae
$ brew install bart
Just run bart
and pass it a list of pair number of arguments (space-delimited),
the label and the value. It's designed to be used in conjunction with other
scripts that can output in that format.
$ bart 2013 10 2014 60 2015 29 2016 0 2017 3
2013: ██████████ 10
2014: ████████████████████████████████████████████████████████████ 60
2015: █████████████████████████████ 29
2016: | 0
2017: ███ 3
$ echo Gin 30 Vermouth 20 Lemon 20 Syrup 10 | bart
Gin: ██████████████████████████████ 30
Vermouth: ████████████████████ 20
Lemon: ████████████████████ 20
Syrup: ██████████ 10
BTW, you can learn more about Cocktails for Programmers.
This was made by Arturo Herrero under the MIT License. Find me on Twitter @ArturoHerrero.