-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4ae7da9
commit 11eaa8b
Showing
5 changed files
with
85 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,9 @@ Pretty print Data as tables on the command line. | |
|
||
The csvtable cli tool allows printing CSV data as a table: | ||
|
||
go install github.com/DavidGamba/dgtools/clitable/cmd/csvtable | ||
go install github.com/DavidGamba/dgtools/clitable/cmd/[email protected] | ||
|
||
To parse TSV data use the `--tsv` flag. | ||
|
||
== Library | ||
|
||
|
@@ -41,6 +43,14 @@ r := strings.NewReader("Hello,1\nWorld,2\n") | |
clitable.NewTablePrinter().FprintCSVReader(os.Stdout, r) | ||
---- | ||
|
||
For TSV from an `io.Reader`: | ||
|
||
[source, go] | ||
---- | ||
r := strings.NewReader("Hello 1\nWorld 2\n") | ||
clitable.NewTablePrinter().Separator('\t').FprintCSVReader(os.Stdout, r) | ||
---- | ||
|
||
---- | ||
┌───────┬───┐ | ||
│ Hello │ 1 │ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
= Changelog | ||
:toc: | ||
|
||
== v0.3.0: New feature | ||
|
||
* Add support for TSV data. | ||
|
||
== v0.2.0: New feature | ||
|
||
* Add CSV Printer | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters