An open API service indexing awesome lists of open source software.

https://github.com/patatetom/ttybarchart

Horizontal bar chart in console with bash
https://github.com/patatetom/ttybarchart

bash chart console graph tty

Last synced: 2 months ago
JSON representation

Horizontal bar chart in console with bash

Awesome Lists containing this project

README

          

# ttybarchart
Horizontal bar chart in console with bash

```bash
$ ttybarchart <<<2015$'\t'50
2015 ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 50

$ echo -e "2015\t50\n2016\t100" | ttybarchart
2015 ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 50
2016 ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 100

$ cat labels.values.tsv
2015 50
2016 100
2017 150

$ ttybarchart labels.values.tsv
2015 ■■■■■■■■■■■■■■■■■■■■■■■ 50
2016 ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 100
2017 ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 150

$ sort -r labels.values.tsv | ttybarchart
2017 ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 150
2016 ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 100
2015 ■■■■■■■■■■■■■■■■■■■■■■■ 50

$ zgrep -h 'GET /application/ ' /var/log/apache2/access.log* |
grep -o '../Feb/2017' |
sort |
uniq -c |
awk '{print $2"\t"$1}' |
ttybarchart
02/Feb/2017 ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 36
03/Feb/2017 ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 30
06/Feb/2017 ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 40
07/Feb/2017 ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 25
08/Feb/2017 ■■■■■■■■■■■■■■■■■■■■■■■■■ 17
09/Feb/2017 ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 21
10/Feb/2017 ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 42
13/Feb/2017 ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 33
14/Feb/2017 ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 22
15/Feb/2017 ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 22
16/Feb/2017 ■■■■■■ 4
```