Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 28 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,27 @@ $ seq 300 | awk 'BEGIN{OFS="\t"; print "x","sin(x)","cos(x)"}{x=$1/10; print x,s

## Installation

If you do not have a go enviroment prepared with the corresponding `GOPATH`
environment variable, you can run these command in Linux:

```bash
mkdir $HOME/go

echo 'export GOPATH=$HOME/go' >> $HOME/.bashrc
echo 'export PATH=$PATH:$GOPATH/bin' >> $HOME/.bashrc
```

Restart the session to have the new environment variables.

With the go environment prepared, you have to run this command in order to
install termeter:

```bash
$ go get github.com/atsaki/termeter/cmd/termeter
go get github.com/jentrialgo/termeter/cmd/termeter
```

The command `termeter` should be in your path.

## Input Data

You can input data with stdin or file.
Expand All @@ -33,13 +50,12 @@ You can input data with stdin or file.
$ cat data.txt | termeter
$ termeter data.txt
```

termeter can accept tabular data like CSV.
Delimiter character can be specified with option '-d DELIMITER'. Default is tab.

## Chart types

termeter supports following chart types.
termeter supports following chart types:

* LINE
* Plot values as line plot
Expand All @@ -49,7 +65,7 @@ termeter supports following chart types.
* Cumulative distribution function

By default, termeter choose chart type automatically from second line of data.
If value is numeric LINE is choosed. Otherwise, COUNTER is choosed.
If value is numeric LINE is choosed. Otherwise, COUNTER is choosed.

You can specify chart type with option ```-t TYPESTRING```.
nth character of TYPESTRING corresponds to nth chart type.
Expand Down Expand Up @@ -80,6 +96,14 @@ $ tail -f -n +7 dstat.log | termeter -d ,

<a href="https://asciinema.org/a/18129"><img src="https://asciinema.org/a/18129.png" /></a>

## Data labels

You specify which data labels to use as X axis in line charts with the option `-L` and one of these options:

* **count**: use the count of data. (Default)
* **first**: use the first column, i.e., the first value in the same line.
* **time**: use current time.

## License

MIT
1 change: 0 additions & 1 deletion cmd/termeter/termeter.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ func main() {

if *dataLabelMode == "first" {
labels = labels[1:]
record = record[1:]
}

types := make([]rune, len(labels), len(labels))
Expand Down