diff --git a/c/cli/mlrcli.c b/c/cli/mlrcli.c index a6980593c..ed1389440 100644 --- a/c/cli/mlrcli.c +++ b/c/cli/mlrcli.c @@ -743,9 +743,9 @@ static void main_usage_format_conversion_keystroke_saver_options(FILE* o, char* fprintf(o, " --j2c --j2t --j2d --j2n --j2x --j2p --j2m\n"); fprintf(o, " --x2c --x2t --x2d --x2n --x2j --x2p --x2m\n"); fprintf(o, " --p2c --p2t --p2d --p2n --p2j --p2x --p2m\n"); - fprintf(o, "The letters c t d n j x p m refer to formats CSV with LF, TSV with LF, DKVP,\n"); - fprintf(o, "NIDX, JSON, XTAB, PPRINT, and markdown, respectively. Note that markdown format\n"); - fprintf(o, "is available for output only.\n"); + fprintf(o, "The letters c t d n j x p m refer to formats CSV, TSV, DKVP, NIDX, JSON, XTAB,\n"); + fprintf(o, "PPRINT, and markdown, respectively. Note that markdown format is available for\n"); + fprintf(o, "output only.\n"); } static void main_usage_compressed_data_options(FILE* o, char* argv0) { diff --git a/doc/10-min.html b/doc/10-min.html index 2787df262..8b58f5857 100644 --- a/doc/10-min.html +++ b/doc/10-min.html @@ -267,7 +267,7 @@ purple square 0 91 72.3735 8.2430

-

mlr head and mlr tail count records. The CSV +

mlr head and mlr tail count records rather than lines. The CSV header is included either way:

@@ -445,6 +445,9 @@ $ mlr --icsv --ojson put '$ratio = $quantity/$rate; $shape = toupper($shape)' ex

+ +

JSON output with vertical-formatting flags: +

@@ -472,9 +475,10 @@ $ mlr --icsv --ojson --jvstack --jlistwrap tail -n 2 example.csv
 

Use then to pipe commands together. Also, the --g option for many Miller commands is for group-by: here, -head -n 1 -g shape outputs the first record for each distinct -value of the shape field. +-g option for many Miller commands is for group-by: here, head -n +1 -g shape outputs the first record for each distinct value of the +shape field. This means we’re finding the record with highest +index field for each distinct shape field:

diff --git a/doc/content-for-10-min.html b/doc/content-for-10-min.html index 1353bda51..c4056d5ce 100644 --- a/doc/content-for-10-min.html +++ b/doc/content-for-10-min.html @@ -20,7 +20,7 @@ POKI_RUN_COMMAND{{mlr --csv cat example.csv}}HERE POKI_RUN_COMMAND{{mlr --icsv --opprint cat example.csv}}HERE -

mlr head and mlr tail count records. The CSV +

mlr head and mlr tail count records rather than lines. The CSV header is included either way: POKI_RUN_COMMAND{{mlr --csv head -n 4 example.csv}}HERE @@ -55,12 +55,16 @@ POKI_RUN_COMMAND{{mlr --icsv --opprint put '$ratio = $quantity / $rate; $color_s

JSON output: POKI_RUN_COMMAND{{mlr --icsv --ojson put '$ratio = $quantity/$rate; $shape = toupper($shape)' example.csv}}HERE + +

JSON output with vertical-formatting flags: + POKI_RUN_COMMAND{{mlr --icsv --ojson --jvstack --jlistwrap tail -n 2 example.csv}}HERE

Use then to pipe commands together. Also, the --g option for many Miller commands is for group-by: here, -head -n 1 -g shape outputs the first record for each distinct -value of the shape field. +-g option for many Miller commands is for group-by: here, head -n +1 -g shape outputs the first record for each distinct value of the +shape field. This means we’re finding the record with highest +index field for each distinct shape field: POKI_RUN_COMMAND{{mlr --icsv --opprint sort -f shape -nr index then head -n 1 -g shape example.csv}}HERE diff --git a/doc/content-for-file-formats.html b/doc/content-for-file-formats.html index 030f2ee1d..9fa0ddff2 100644 --- a/doc/content-for-file-formats.html +++ b/doc/content-for-file-formats.html @@ -56,15 +56,12 @@ of platform.

  • CSV supports RFC-4180)-style double-quoting, including the ability to have commas and/or -CR-LF line-endings contained within an input field; CSV-lite does not. - -
  • Default record separator for CSV is CR-LF; default record separator for -CSV-lite is LF. +LF/CRLF line-endings contained within an input field; CSV-lite does not.
  • CSV does not allow heterogeneous data; CSV-lite does (see also here). -
  • The CSV-lite input-reading code is more efficient than the CSV +
  • The CSV-lite input-reading code is fractionally more efficient than the CSV input-reader. @@ -220,9 +217,9 @@ truly powerful, JSON-specific tool.

    JSON non-streaming

    -

    The JSON parser does not return until all input is parsed: in particular -this means that, unlike for other file formats, Miller does not (at present) -handle JSON files in tail -f contexts. +

    The JSON parser Miller uses does not return until all input is parsed: in +particular this means that, unlike for other file formats, Miller does not (at +present) handle JSON files in tail -f contexts.

  • PPRINT: Pretty-printed tabular

    @@ -302,7 +299,7 @@ POKI_RUN_COMMAND{{mlr --usage-format-conversion-keystroke-saver-options}}HERE
    -

    Default line endings (--irs and --ors) are auto +

    Default line endings (--irs and --ors) are 'auto' which means autodetect from the input file format, as long as the input file(s) have lines ending in either LF (also known as linefeed, '\n', 0x0a, Unix-style) or CRLF (also known as diff --git a/doc/cookbook.html b/doc/cookbook.html index f755fcd50..7565a9aaa 100644 --- a/doc/cookbook.html +++ b/doc/cookbook.html @@ -1091,33 +1091,33 @@ $ mlr --ofmt '%.9lf' --opprint seqgen --start 1 --stop 28 then put ' ' then put '$seconds=systime()' then step -a delta -f seconds then cut -x -f seconds i o fcount seconds_delta 1 1 1 0 -2 2 3 0.000030994 -3 3 5 0.000012875 +2 2 3 0.000034094 +3 3 5 0.000011921 4 5 9 0.000015020 -5 8 15 0.000020027 -6 13 25 0.000029087 -7 21 41 0.000042915 -8 34 67 0.000066996 -9 55 109 0.000104904 -10 89 177 0.000168085 -11 144 287 0.000272036 -12 233 465 0.000429869 -13 377 753 0.000686169 -14 610 1219 0.001107931 -15 987 1973 0.001784086 -16 1597 3193 0.002952814 -17 2584 5167 0.004665136 -18 4181 8361 0.007502079 -19 6765 13529 0.012058973 -20 10946 21891 0.019434929 -21 17711 35421 0.031375885 -22 28657 57313 0.049787998 -23 46368 92735 0.080844164 -24 75025 150049 0.129994869 -25 121393 242785 0.209208965 -26 196418 392835 0.344423056 -27 317811 635621 0.583369017 -28 514229 1028457 0.946258068 +5 8 15 0.000020981 +6 13 25 0.000030041 +7 21 41 0.000044107 +8 34 67 0.000068903 +9 55 109 0.000108004 +10 89 177 0.000171900 +11 144 287 0.000279188 +12 233 465 0.000441790 +13 377 753 0.000728130 +14 610 1219 0.001293898 +15 987 1973 0.001834154 +16 1597 3193 0.004330873 +17 2584 5167 0.006086111 +18 4181 8361 0.008031845 +19 6765 13529 0.012267113 +20 10946 21891 0.020168066 +21 17711 35421 0.031072855 +22 28657 57313 0.055731058 +23 46368 92735 0.080446005 +24 75025 150049 0.130995035 +25 121393 242785 0.207859993 +26 196418 392835 0.338934898 +27 317811 635621 0.546113968 +28 514229 1028457 0.924782991

    @@ -1149,33 +1149,33 @@ $ mlr --ofmt '%.9lf' --opprint seqgen --start 1 --stop 28 then put ' ' then put '$seconds=systime()' then step -a delta -f seconds then cut -x -f seconds i o fcount seconds_delta 1 1 1 0 -2 2 3 0.000034809 -3 3 3 0.000013113 +2 2 3 0.000039101 +3 3 3 0.000014067 4 5 3 0.000010967 5 8 3 0.000010967 6 13 3 0.000010967 -7 21 3 0.000010014 -8 34 3 0.000010014 -9 55 3 0.000010967 -10 89 3 0.000012159 -11 144 3 0.000010014 -12 233 3 0.000013828 -13 377 3 0.000011206 -14 610 3 0.000010014 -15 987 3 0.000009775 -16 1597 3 0.000010014 -17 2584 3 0.000011206 -18 4181 3 0.000009775 -19 6765 3 0.000010014 -20 10946 3 0.000010014 +7 21 3 0.000010967 +8 34 3 0.000010967 +9 55 3 0.000011206 +10 89 3 0.000011921 +11 144 3 0.000010967 +12 233 3 0.000015974 +13 377 3 0.000011921 +14 610 3 0.000011206 +15 987 3 0.000011921 +16 1597 3 0.000010967 +17 2584 3 0.000010967 +18 4181 3 0.000010967 +19 6765 3 0.000012159 +20 10946 3 0.000010967 21 17711 3 0.000010014 -22 28657 3 0.000010014 -23 46368 3 0.000012159 -24 75025 3 0.000010014 +22 28657 3 0.000010967 +23 46368 3 0.000012875 +24 75025 3 0.000012159 25 121393 3 0.000010967 -26 196418 3 0.000010014 -27 317811 3 0.000010014 -28 514229 3 0.000009775 +26 196418 3 0.000010967 +27 317811 3 0.000010967 +28 514229 3 0.000010967

    diff --git a/doc/cookbook2.html b/doc/cookbook2.html index 0eaee594c..f6e11ae5f 100644 --- a/doc/cookbook2.html +++ b/doc/cookbook2.html @@ -567,11 +567,11 @@ begin { @iwidth = 100; @maxits = 100; @levelstep = 5; - @chars = "@X*o-."; + @chars = "@X*o-."; # Palette of characters to print to the screen. @verbose = false; @do_julia = false; - @jr = 0.0; - @ji = 0.0; + @jr = 0.0; # Real part of Julia point, if any + @ji = 0.0; # Imaginary part of Julia point, if any } # Here, we can override defaults from an input file (if any). In Miller's @@ -614,7 +614,8 @@ end { } } -# Function to approximate membership in the Mandelbrot set for a given point in the +# This is a function to approximate membership in the Mandelbrot set (or Julia +# set for a given Julia point if do_julia == true) for a given point in the # complex plane. func get_point_plot(pr, pi, maxits, do_julia, jr, ji) { num zr = 0.0; diff --git a/doc/file-formats.html b/doc/file-formats.html index e6b43c32e..163ba9da3 100644 --- a/doc/file-formats.html +++ b/doc/file-formats.html @@ -326,15 +326,12 @@ of platform.

  • CSV supports RFC-4180)-style double-quoting, including the ability to have commas and/or -CR-LF line-endings contained within an input field; CSV-lite does not. - -
  • Default record separator for CSV is CR-LF; default record separator for -CSV-lite is LF. +LF/CRLF line-endings contained within an input field; CSV-lite does not.
  • CSV does not allow heterogeneous data; CSV-lite does (see also here). -
  • The CSV-lite input-reading code is more efficient than the CSV +
  • The CSV-lite input-reading code is fractionally more efficient than the CSV input-reader. @@ -683,9 +680,9 @@ truly powerful, JSON-specific tool.

    JSON non-streaming

    -

    The JSON parser does not return until all input is parsed: in particular -this means that, unlike for other file formats, Miller does not (at present) -handle JSON files in tail -f contexts. +

    The JSON parser Miller uses does not return until all input is parsed: in +particular this means that, unlike for other file formats, Miller does not (at +present) handle JSON files in tail -f contexts.

    PPRINT: Pretty-printed tabular

    @@ -866,9 +863,9 @@ As keystroke-savers for format-conversion you may use the following: --j2c --j2t --j2d --j2n --j2x --j2p --j2m --x2c --x2t --x2d --x2n --x2j --x2p --x2m --p2c --p2t --p2d --p2n --p2j --p2x --p2m -The letters c t d n j x p m refer to formats CSV with LF, TSV with LF, DKVP, -NIDX, JSON, XTAB, PPRINT, and markdown, respectively. Note that markdown format -is available for output only. +The letters c t d n j x p m refer to formats CSV, TSV, DKVP, NIDX, JSON, XTAB, +PPRINT, and markdown, respectively. Note that markdown format is available for +output only.

    @@ -880,7 +877,7 @@ is available for output only.

    -

    Default line endings (--irs and --ors) are auto +

    Default line endings (--irs and --ors) are 'auto' which means autodetect from the input file format, as long as the input file(s) have lines ending in either LF (also known as linefeed, '\n', 0x0a, Unix-style) or CRLF (also known as diff --git a/doc/manpage.html b/doc/manpage.html index fd04ebb8d..f7610aeef 100644 --- a/doc/manpage.html +++ b/doc/manpage.html @@ -389,9 +389,9 @@ OPTIONS --j2c --j2t --j2d --j2n --j2x --j2p --j2m --x2c --x2t --x2d --x2n --x2j --x2p --x2m --p2c --p2t --p2d --p2n --p2j --p2x --p2m - The letters c t d n j x p m refer to formats CSV with LF, TSV with LF, DKVP, - NIDX, JSON, XTAB, PPRINT, and markdown, respectively. Note that markdown format - is available for output only. + The letters c t d n j x p m refer to formats CSV, TSV, DKVP, NIDX, JSON, XTAB, + PPRINT, and markdown, respectively. Note that markdown format is available for + output only. COMPRESSED I/O --prepipe {command} This allows Miller to handle compressed inputs. You can do diff --git a/doc/manpage.txt b/doc/manpage.txt index 4e4b41fb9..8a74cc89e 100644 --- a/doc/manpage.txt +++ b/doc/manpage.txt @@ -196,9 +196,9 @@ OPTIONS --j2c --j2t --j2d --j2n --j2x --j2p --j2m --x2c --x2t --x2d --x2n --x2j --x2p --x2m --p2c --p2t --p2d --p2n --p2j --p2x --p2m - The letters c t d n j x p m refer to formats CSV with LF, TSV with LF, DKVP, - NIDX, JSON, XTAB, PPRINT, and markdown, respectively. Note that markdown format - is available for output only. + The letters c t d n j x p m refer to formats CSV, TSV, DKVP, NIDX, JSON, XTAB, + PPRINT, and markdown, respectively. Note that markdown format is available for + output only. COMPRESSED I/O --prepipe {command} This allows Miller to handle compressed inputs. You can do diff --git a/doc/mlr.1 b/doc/mlr.1 index 1e93bdd1f..dccb4a6a6 100644 --- a/doc/mlr.1 +++ b/doc/mlr.1 @@ -257,9 +257,9 @@ As keystroke-savers for format-conversion you may use the following: --j2c --j2t --j2d --j2n --j2x --j2p --j2m --x2c --x2t --x2d --x2n --x2j --x2p --x2m --p2c --p2t --p2d --p2n --p2j --p2x --p2m -The letters c t d n j x p m refer to formats CSV with LF, TSV with LF, DKVP, -NIDX, JSON, XTAB, PPRINT, and markdown, respectively. Note that markdown format -is available for output only. +The letters c t d n j x p m refer to formats CSV, TSV, DKVP, NIDX, JSON, XTAB, +PPRINT, and markdown, respectively. Note that markdown format is available for +output only. .fi .if n \{\ .RE diff --git a/doc/reference.html b/doc/reference.html index fd0ff44fd..c6d8c49d7 100644 --- a/doc/reference.html +++ b/doc/reference.html @@ -499,9 +499,9 @@ As keystroke-savers for format-conversion you may use the following: --j2c --j2t --j2d --j2n --j2x --j2p --j2m --x2c --x2t --x2d --x2n --x2j --x2p --x2m --p2c --p2t --p2d --p2n --p2j --p2x --p2m -The letters c t d n j x p m refer to formats CSV with LF, TSV with LF, DKVP, -NIDX, JSON, XTAB, PPRINT, and markdown, respectively. Note that markdown format -is available for output only. +The letters c t d n j x p m refer to formats CSV, TSV, DKVP, NIDX, JSON, XTAB, +PPRINT, and markdown, respectively. Note that markdown format is available for +output only. Compressed-data options: --prepipe {command} This allows Miller to handle compressed inputs. You can do