mkaz/termgraph — pull request #3 by Aquassaut (2015-01-01 00:32:35+00:00)
Title: Stdin support

This pull requests makes it possible to use stdin instead of a file.

For instance:

> cat ex1.dat | termgraph.py -

```
------------------------------------
Reading data from stdin
------------------------------------

2007: ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 183.32
2008: ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 231.23
2009: ▇ 16.43
2010: ▇▇▇▇ 50.21
2011: ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 508.97
2012: ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 212.05

```

Or as requested by [#1](https://github.com/mkaz/termgraph/issues/1):

> cat "a a b b b" | sed 's/ /\n/g' | uniq -c | awk '{ print $2 "," $1 ; }' | termgraph.py

```
------------------------------------
Reading data from stdin
------------------------------------

a: ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 2.00
b: ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 3.00
```

Happy new year, by the way.