TSV is a library (and a set of tool) to manipulate Tabular separated values.
It is inspired by solidsnack/tsv and thoughts from Donald Merand: TSV - The Best Spreadsheet Format
$ go get github.com/squioc/tsv/pkg/tsv
TSV holds a set of tools to manipulate Tabular data.
Converts tsv records into yaml
$ go get github.com/squioc/tsv/cmd/tsv-yaml
$ tsv-yaml --columns first,second
cell1 cell2
^D
- first: cell1
second: cell2
$ cat cells.tsv | tsv-yaml --columns first,second
- first: cell1
second: cell2
Converts tsv records into json
$ go get github.com/squioc/tsv/cmd/tsv-json
$ tsv-json --columns first,second
cell1 cell2
^D
[{"first":"cell1","second":"cell2"}]
$ cat cells.tsv | tsv-json --columns first,second
[{"first":"cell1","second":"cell2"}]
Converts tsv records into jsonline
$ go get github.com/squioc/tsv/cmd/tsv-jsonline
$ tsv-jsonline --columns first,second
cell1 cell2
^D
{"first":"cell1","second":"cell2"}
$ cat cells.tsv | tsv-jsonline --columns first,second
{"first":"cell1","second":"cell2"}
Format the tsv input in order to vertically align columns
$ go get github.com/squioc/tsv/cmd/tsv-fmt
$ tsv-fmt cells.tsv
cell1 cell2
columns1 columns2
$ cat cells.tsv | tsv-fmt
cell1 cell2
columns1 columns2