-
-
Notifications
You must be signed in to change notification settings - Fork 85
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
92166be
commit b01b81b
Showing
4 changed files
with
76 additions
and
27 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
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
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 |
---|---|---|
|
@@ -1327,7 +1327,7 @@ <h2 id="csvtk">csvtk</h2> | |
<p>Usage</p> | ||
<pre><code class="language-text">csvtk -- a cross-platform, efficient and practical CSV/TSV toolkit | ||
|
||
Version: 0.31.1 | ||
Version: 0.32.0 | ||
|
||
Author: Wei Shen <[email protected]> | ||
|
||
|
@@ -1826,8 +1826,11 @@ <h2 id="pretty">pretty</h2> | |
|
||
How to: | ||
1. First -n/--buf-rows rows are read to check the minimum and maximum widths | ||
of each columns. You can also set the global thresholds -w/--min-width and | ||
-W/--max-width. | ||
of each columns. | ||
|
||
You can also set the global or column-specific (the number of values need | ||
equal to the number of columns) thresholds via -w/--min-width and -W/--max-width. | ||
|
||
1a. Cells longer than the maximum width will be wrapped (default) or | ||
clipped (--clip). | ||
Usually, the text is wrapped in space (-x/--wrap-delimiter). But if one | ||
|
@@ -1903,6 +1906,16 @@ <h2 id="pretty">pretty</h2> | |
| 2 | Tiny | | ||
└----┴------┘ | ||
|
||
round: | ||
|
||
╭----┬------╮ | ||
| id | size | | ||
├====┼======┤ | ||
| 1 | Huge | | ||
├----┼------┤ | ||
| 2 | Tiny | | ||
╰----┴------╯ | ||
|
||
bold: | ||
|
||
┏━━━━┳━━━━━━┓ | ||
|
@@ -1936,11 +1949,15 @@ <h2 id="pretty">pretty</h2> | |
--clip clip longer cell instead of wrapping | ||
--clip-mark string clip mark (default "...") | ||
-h, --help help for pretty | ||
-W, --max-width int max width | ||
-w, --min-width int min width | ||
-W, --max-width strings max width, multiple values (max widths for each column, 0 for no limit) | ||
should be separated by commas. E.g., -W 40,20,0 limits the max widths of | ||
1st and 2nd columns | ||
-w, --min-width strings min width, multiple values (min widths for each column, 0 for no limit) | ||
should be separated by commas. E.g., -w 0,10,10 limits the min widths of | ||
2nd and 3rd columns | ||
-s, --separator string fields/columns separator (default " ") | ||
-S, --style string output syle. available vaules: default, plain, simple, 3line, grid, | ||
light, bold, double. check https://github.com/shenwei356/stable | ||
light, round, bold, double. check https://github.com/shenwei356/stable | ||
-x, --wrap-delimiter string delimiter for wrapping cells (default " ") | ||
|
||
</code></pre> | ||
|
@@ -2036,7 +2053,7 @@ <h2 id="pretty">pretty</h2> | |
</code></pre> | ||
</li> | ||
<li> | ||
<p>Set the minimum and maximum width.</p> | ||
<p>Set the global minimum and maximum width.</p> | ||
<pre><code>$ csvtk pretty testdata/long.csv -w 5 -W 40 | ||
id name message | ||
----- ------------------ ---------------------------------------- | ||
|
@@ -2050,6 +2067,24 @@ <h2 id="pretty">pretty</h2> | |
</code></pre> | ||
</li> | ||
<li> | ||
<p>Set min and max widths for all columns.</p> | ||
<pre><code>$ csvtk pretty testdata/long.csv -w 5,25,0 -W 0,30,40 -m 1,2 -S round | ||
╭-------┬---------------------------┬------------------------------------------╮ | ||
| id | name | message | | ||
├=======┼===========================┼==========================================┤ | ||
| 1 | Donec Vitae | Quis autem vel eum iure reprehenderit | | ||
| | | qui in ea voluptate velit esse. | | ||
├-------┼---------------------------┼------------------------------------------┤ | ||
| 2 | Quaerat Voluptatem | At vero eos et accusamus et iusto odio. | | ||
├-------┼---------------------------┼------------------------------------------┤ | ||
| 3 | Aliquam lorem | Curabitur ullamcorper ultricies nisi. | | ||
| | | Nam eget dui. Etiam rhoncus. Maecenas | | ||
| | | tempus, tellus eget condimentum | | ||
| | | rhoncus, sem quam semper libero. | | ||
╰-------┴---------------------------┴------------------------------------------╯ | ||
</code></pre> | ||
</li> | ||
<li> | ||
<p>Clipping cells instead of wrapping</p> | ||
<pre><code>$ csvtk pretty testdata/long.csv -w 5 -W 40 --clip | ||
id name message | ||
|