-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes the mixed tab and space identation introduced by code formatting.
- Loading branch information
1 parent
b6a5722
commit b69474b
Showing
4 changed files
with
56 additions
and
54 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
DESCRIPTION | ||
Render bar charts from file contents and command output in various formats. | ||
|
||
USAGE: | ||
chart [OPTIONS] | ||
|
||
OPTIONS: | ||
-p, --precision INT Precision for values (default: %d) | ||
-c, --count Count line occurrences | ||
-d, --desc Sort chart in descending order | ||
-i, --in FILE Read data from file instead of stdin | ||
-l, --length INT Set maximum chart length (default: %d) | ||
-L, --label-length INT Set maximum label length (default: %d) | ||
-m, --mermaid Create Mermaid XYChart | ||
-C, --chartjs Create Chart.js configuration | ||
-o, --out FILE Write to file instead of stdout (overwrites contents) | ||
-s, --sort SORT Sort chart; see SORT OPTIONS below | ||
-t, --tick CHAR Use specified character for drawing bars | ||
-T, --title TITLE Chart title (Mermaid). | ||
-v, --version Display version information and exit | ||
|
||
SORT OPTIONS: | ||
none: Keep order of insertion (default) | ||
label: Alphabetically sort bars by label | ||
labelnum: Numerically sort bars by label | ||
value: Numerically sort bars by value | ||
|
||
EXAMPLES: | ||
# Chart 'uniq -c' command output: | ||
$ cat data.txt | sort | uniq -c | chart | ||
|
||
# Chart contents of file by counting lines: | ||
$ chart --in data.txt --count | ||
|
||
# Sort chart by value in descending order: | ||
$ cat data.txt | chart --count --sort value --desc | ||
|
||
# Generate a Mermaid XYChart: | ||
$ cat data.txt | chart --mermaid | ||
|
||
# Generate a Chart.js configuration: | ||
$ cat data.txt | chart --chartjs |