mirror of
https://github.com/johnkerl/miller.git
synced 2026-01-23 02:14:13 +00:00
Support markdown format on input (#1478)
* Support markdown on input * unit-test files * doc mods * Unit-test cases for I/O-format keystroke-savers * -i/-o md as well as -i/-o markdown
This commit is contained in:
parent
2abb9b4729
commit
af021f28d7
243 changed files with 803 additions and 114 deletions
|
|
@ -80,7 +80,7 @@
|
|||
| 4 5 6 | Record 2: "apple":"4", "bat":"5", "cog":"6"
|
||||
+---------------------+
|
||||
|
||||
Markdown tabular (supported for output only):
|
||||
Markdown tabular:
|
||||
+-----------------------+
|
||||
| | apple | bat | cog | |
|
||||
| | --- | --- | --- | |
|
||||
|
|
@ -360,6 +360,7 @@
|
|||
seqgen verb, which is more useful/intuitive.
|
||||
--ijson Use JSON format for input data.
|
||||
--ijsonl Use JSON Lines format for input data.
|
||||
--imd or --imarkdown Use markdown-tabular format for input data.
|
||||
--inidx Use NIDX format for input data.
|
||||
--io {format name} Use format name for input and output data. For
|
||||
example: `--io csv` is the same as `--csv`.
|
||||
|
|
@ -377,7 +378,7 @@
|
|||
--odkvp Use DKVP format for output data.
|
||||
--ojson Use JSON format for output data.
|
||||
--ojsonl Use JSON Lines format for output data.
|
||||
--omd Use markdown-tabular format for output data.
|
||||
--omd or --omarkdown Use markdown-tabular format for output data.
|
||||
--onidx Use NIDX format for output data.
|
||||
--opprint Use PPRINT format for output data.
|
||||
--otsv Use TSV format for output data.
|
||||
|
|
@ -419,19 +420,19 @@
|
|||
1mFORMAT-CONVERSION KEYSTROKE-SAVER FLAGS0m
|
||||
As keystroke-savers for format-conversion you may use the following.
|
||||
The letters c, t, j, l, d, n, x, p, and m refer to formats CSV, TSV, DKVP, NIDX,
|
||||
JSON, JSON Lines, XTAB, PPRINT, and markdown, respectively. Note that markdown
|
||||
format is available for output only.
|
||||
JSON, JSON Lines, XTAB, PPRINT, and markdown, respectively.
|
||||
|
||||
| In\out | CSV | TSV | JSON | JSONL | DKVP | NIDX | XTAB | PPRINT | Markdown |
|
||||
+--------+-------+-------+--------+--------+--------+--------+--------+----------+
|
||||
| CSV | | --c2t | --c2j | --c2l | --c2d | --c2n | --c2x | --c2p | --c2m |
|
||||
| TSV | --t2c | | --t2j | --t2l | --t2d | --t2n | --t2x | --t2p | --t2m |
|
||||
| JSON | --j2c | --j2t | | --j2l | --j2d | --j2n | --j2x | --j2p | --j2m |
|
||||
| JSONL | --l2c | --l2t | | | --l2d | --l2n | --l2x | --l2p | --l2m |
|
||||
| DKVP | --d2c | --d2t | --d2j | --d2l | | --d2n | --d2x | --d2p | --d2m |
|
||||
| NIDX | --n2c | --n2t | --n2j | --n2l | --n2d | | --n2x | --n2p | --n2m |
|
||||
| XTAB | --x2c | --x2t | --x2j | --x2l | --x2d | --x2n | | --x2p | --x2m |
|
||||
| PPRINT | --p2c | --p2t | --p2j | --p2l | --p2d | --p2n | --p2x | | --p2m |
|
||||
| In\out | CSV | TSV | JSON | JSONL | DKVP | NIDX | XTAB | PPRINT | Markdown |
|
||||
+----------+-------+-------+--------+--------+--------+--------+--------+--------+----------|
|
||||
| CSV | | --c2t | --c2j | --c2l | --c2d | --c2n | --c2x | --c2p | --c2m |
|
||||
| TSV | --t2c | | --t2j | --t2l | --t2d | --t2n | --t2x | --t2p | --t2m |
|
||||
| JSON | --j2c | --j2t | | --j2l | --j2d | --j2n | --j2x | --j2p | --j2m |
|
||||
| JSONL | --l2c | --l2t | | | --l2d | --l2n | --l2x | --l2p | --l2m |
|
||||
| DKVP | --d2c | --d2t | --d2j | --d2l | | --d2n | --d2x | --d2p | --d2m |
|
||||
| NIDX | --n2c | --n2t | --n2j | --n2l | --n2d | | --n2x | --n2p | --n2m |
|
||||
| XTAB | --x2c | --x2t | --x2j | --x2l | --x2d | --x2n | | --x2p | --x2m |
|
||||
| PPRINT | --p2c | --p2t | --p2j | --p2l | --p2d | --p2n | --p2x | | --p2m |
|
||||
| Markdown | --m2c | --m2t | --m2j | --m2l | --m2d | --m2n | --m2x | --m2p | |
|
||||
|
||||
-p Keystroke-saver for `--nidx --fs space --repifs`.
|
||||
-T Keystroke-saver for `--nidx --fs tab`.
|
||||
|
|
|
|||
29
man/mlr.1
29
man/mlr.1
|
|
@ -111,7 +111,7 @@ PPRINT: pretty-printed tabular
|
|||
| 4 5 6 | Record 2: "apple":"4", "bat":"5", "cog":"6"
|
||||
+---------------------+
|
||||
|
||||
Markdown tabular (supported for output only):
|
||||
Markdown tabular:
|
||||
+-----------------------+
|
||||
| | apple | bat | cog | |
|
||||
| | --- | --- | --- | |
|
||||
|
|
@ -441,6 +441,7 @@ are overridden in all cases by setting output format to `format2`.
|
|||
seqgen verb, which is more useful/intuitive.
|
||||
--ijson Use JSON format for input data.
|
||||
--ijsonl Use JSON Lines format for input data.
|
||||
--imd or --imarkdown Use markdown-tabular format for input data.
|
||||
--inidx Use NIDX format for input data.
|
||||
--io {format name} Use format name for input and output data. For
|
||||
example: `--io csv` is the same as `--csv`.
|
||||
|
|
@ -458,7 +459,7 @@ are overridden in all cases by setting output format to `format2`.
|
|||
--odkvp Use DKVP format for output data.
|
||||
--ojson Use JSON format for output data.
|
||||
--ojsonl Use JSON Lines format for output data.
|
||||
--omd Use markdown-tabular format for output data.
|
||||
--omd or --omarkdown Use markdown-tabular format for output data.
|
||||
--onidx Use NIDX format for output data.
|
||||
--opprint Use PPRINT format for output data.
|
||||
--otsv Use TSV format for output data.
|
||||
|
|
@ -516,19 +517,19 @@ See the Flatten/unflatten doc page for more information.
|
|||
.nf
|
||||
As keystroke-savers for format-conversion you may use the following.
|
||||
The letters c, t, j, l, d, n, x, p, and m refer to formats CSV, TSV, DKVP, NIDX,
|
||||
JSON, JSON Lines, XTAB, PPRINT, and markdown, respectively. Note that markdown
|
||||
format is available for output only.
|
||||
JSON, JSON Lines, XTAB, PPRINT, and markdown, respectively.
|
||||
|
||||
| In\eout | CSV | TSV | JSON | JSONL | DKVP | NIDX | XTAB | PPRINT | Markdown |
|
||||
+--------+-------+-------+--------+--------+--------+--------+--------+----------+
|
||||
| CSV | | --c2t | --c2j | --c2l | --c2d | --c2n | --c2x | --c2p | --c2m |
|
||||
| TSV | --t2c | | --t2j | --t2l | --t2d | --t2n | --t2x | --t2p | --t2m |
|
||||
| JSON | --j2c | --j2t | | --j2l | --j2d | --j2n | --j2x | --j2p | --j2m |
|
||||
| JSONL | --l2c | --l2t | | | --l2d | --l2n | --l2x | --l2p | --l2m |
|
||||
| DKVP | --d2c | --d2t | --d2j | --d2l | | --d2n | --d2x | --d2p | --d2m |
|
||||
| NIDX | --n2c | --n2t | --n2j | --n2l | --n2d | | --n2x | --n2p | --n2m |
|
||||
| XTAB | --x2c | --x2t | --x2j | --x2l | --x2d | --x2n | | --x2p | --x2m |
|
||||
| PPRINT | --p2c | --p2t | --p2j | --p2l | --p2d | --p2n | --p2x | | --p2m |
|
||||
| In\eout | CSV | TSV | JSON | JSONL | DKVP | NIDX | XTAB | PPRINT | Markdown |
|
||||
+----------+-------+-------+--------+--------+--------+--------+--------+--------+----------|
|
||||
| CSV | | --c2t | --c2j | --c2l | --c2d | --c2n | --c2x | --c2p | --c2m |
|
||||
| TSV | --t2c | | --t2j | --t2l | --t2d | --t2n | --t2x | --t2p | --t2m |
|
||||
| JSON | --j2c | --j2t | | --j2l | --j2d | --j2n | --j2x | --j2p | --j2m |
|
||||
| JSONL | --l2c | --l2t | | | --l2d | --l2n | --l2x | --l2p | --l2m |
|
||||
| DKVP | --d2c | --d2t | --d2j | --d2l | | --d2n | --d2x | --d2p | --d2m |
|
||||
| NIDX | --n2c | --n2t | --n2j | --n2l | --n2d | | --n2x | --n2p | --n2m |
|
||||
| XTAB | --x2c | --x2t | --x2j | --x2l | --x2d | --x2n | | --x2p | --x2m |
|
||||
| PPRINT | --p2c | --p2t | --p2j | --p2l | --p2d | --p2n | --p2x | | --p2m |
|
||||
| Markdown | --m2c | --m2t | --m2j | --m2l | --m2d | --m2n | --m2x | --m2p | |
|
||||
|
||||
-p Keystroke-saver for `--nidx --fs space --repifs`.
|
||||
-T Keystroke-saver for `--nidx --fs tab`.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue