From 5c58414746b8108a080f00ad55860f9b5a2fc12f Mon Sep 17 00:00:00 2001 From: John Kerl Date: Sat, 16 Mar 2024 17:00:50 -0400 Subject: [PATCH 1/2] Add more info in online help about what put/filter do --- pkg/transformers/put_or_filter.go | 8 ++++++++ test/cases/cli-help/0001/expout | 7 +++++++ 2 files changed, 15 insertions(+) diff --git a/pkg/transformers/put_or_filter.go b/pkg/transformers/put_or_filter.go index 1437c8b158..5ba42435b8 100644 --- a/pkg/transformers/put_or_filter.go +++ b/pkg/transformers/put_or_filter.go @@ -52,6 +52,14 @@ func transformerPutOrFilterUsage( verb string, ) { fmt.Fprintf(o, "Usage: %s %s [options] {DSL expression}\n", "mlr", verb) + if verb == "put" { + fmt.Fprintf(o, "Lets you use a domain-specific language to progamatically alter stream records.\n") + } else if verb == "filter" { + fmt.Fprintf(o, "Lets you use a domain-specific language to progamatically filter which\n") + fmt.Fprintf(o, "stream records will be output.\n") + } + fmt.Fprintf(o, "See also: https://miller.readthedocs.io/en/latest/reference-verbs\n") + fmt.Fprintf(o, "\n") fmt.Fprintf(o, "Options:\n") fmt.Fprintf(o, `-f {file name} File containing a DSL expression (see examples below). If the filename diff --git a/test/cases/cli-help/0001/expout b/test/cases/cli-help/0001/expout index 95b4d3f141..33eed96d5d 100644 --- a/test/cases/cli-help/0001/expout +++ b/test/cases/cli-help/0001/expout @@ -186,6 +186,10 @@ Options: ================================================================ filter Usage: mlr filter [options] {DSL expression} +Lets you use a domain-specific language to progamatically filter which +stream records will be output. +See also: https://miller.readthedocs.io/en/latest/reference-verbs + Options: -f {file name} File containing a DSL expression (see examples below). If the filename is a directory, all *.mlr files in that directory are loaded. @@ -661,6 +665,9 @@ Options: ================================================================ put Usage: mlr put [options] {DSL expression} +Lets you use a domain-specific language to progamatically alter stream records. +See also: https://miller.readthedocs.io/en/latest/reference-verbs + Options: -f {file name} File containing a DSL expression (see examples below). If the filename is a directory, all *.mlr files in that directory are loaded. From d0e15a876d9c4b2a79a6002df0a2faaadf341cdd Mon Sep 17 00:00:00 2001 From: John Kerl Date: Sat, 16 Mar 2024 17:04:20 -0400 Subject: [PATCH 2/2] `make dev` artifacts --- docs/src/manpage.md | 10 +++++++++- docs/src/manpage.txt | 10 +++++++++- docs/src/reference-main-flag-list.md | 1 + docs/src/reference-verbs.md | 7 +++++++ man/manpage.txt | 10 +++++++++- man/mlr.1 | 12 ++++++++++-- 6 files changed, 45 insertions(+), 5 deletions(-) diff --git a/docs/src/manpage.md b/docs/src/manpage.md index 4b80cdeeee..f85e6bd573 100644 --- a/docs/src/manpage.md +++ b/docs/src/manpage.md @@ -804,6 +804,7 @@ This is simply a copy of what you should see on running `man mlr` at a command p csv "," N/A "\n" csvlite "," N/A "\n" dkvp "," "=" "\n" + gen "," N/A "\n" json N/A N/A N/A markdown " " N/A "\n" nidx " " N/A "\n" @@ -1072,6 +1073,10 @@ This is simply a copy of what you should see on running `man mlr` at a command p 1mfilter0m Usage: mlr filter [options] {DSL expression} + Lets you use a domain-specific language to progamatically filter which + stream records will be output. + See also: https://miller.readthedocs.io/en/latest/reference-verbs + Options: -f {file name} File containing a DSL expression (see examples below). If the filename is a directory, all *.mlr files in that directory are loaded. @@ -1525,6 +1530,9 @@ This is simply a copy of what you should see on running `man mlr` at a command p 1mput0m Usage: mlr put [options] {DSL expression} + Lets you use a domain-specific language to progamatically alter stream records. + See also: https://miller.readthedocs.io/en/latest/reference-verbs + Options: -f {file name} File containing a DSL expression (see examples below). If the filename is a directory, all *.mlr files in that directory are loaded. @@ -3704,5 +3712,5 @@ This is simply a copy of what you should see on running `man mlr` at a command p MIME Type for Comma-Separated Values (CSV) Files, the Miller docsite https://miller.readthedocs.io - 2024-02-18 4mMILLER24m(1) + 2024-03-16 4mMILLER24m(1) diff --git a/docs/src/manpage.txt b/docs/src/manpage.txt index 15c9d6232b..5f16957013 100644 --- a/docs/src/manpage.txt +++ b/docs/src/manpage.txt @@ -783,6 +783,7 @@ csv "," N/A "\n" csvlite "," N/A "\n" dkvp "," "=" "\n" + gen "," N/A "\n" json N/A N/A N/A markdown " " N/A "\n" nidx " " N/A "\n" @@ -1051,6 +1052,10 @@ 1mfilter0m Usage: mlr filter [options] {DSL expression} + Lets you use a domain-specific language to progamatically filter which + stream records will be output. + See also: https://miller.readthedocs.io/en/latest/reference-verbs + Options: -f {file name} File containing a DSL expression (see examples below). If the filename is a directory, all *.mlr files in that directory are loaded. @@ -1504,6 +1509,9 @@ 1mput0m Usage: mlr put [options] {DSL expression} + Lets you use a domain-specific language to progamatically alter stream records. + See also: https://miller.readthedocs.io/en/latest/reference-verbs + Options: -f {file name} File containing a DSL expression (see examples below). If the filename is a directory, all *.mlr files in that directory are loaded. @@ -3683,4 +3691,4 @@ MIME Type for Comma-Separated Values (CSV) Files, the Miller docsite https://miller.readthedocs.io - 2024-02-18 4mMILLER24m(1) + 2024-03-16 4mMILLER24m(1) diff --git a/docs/src/reference-main-flag-list.md b/docs/src/reference-main-flag-list.md index fde4d9496c..11f07f9af6 100644 --- a/docs/src/reference-main-flag-list.md +++ b/docs/src/reference-main-flag-list.md @@ -477,6 +477,7 @@ Notes about all other separators: csv "," N/A "\n" csvlite "," N/A "\n" dkvp "," "=" "\n" + gen "," N/A "\n" json N/A N/A N/A markdown " " N/A "\n" nidx " " N/A "\n" diff --git a/docs/src/reference-verbs.md b/docs/src/reference-verbs.md index 417aa4d9b4..485343ee7c 100644 --- a/docs/src/reference-verbs.md +++ b/docs/src/reference-verbs.md @@ -970,6 +970,10 @@ a,b,c
 Usage: mlr filter [options] {DSL expression}
+Lets you use a domain-specific language to progamatically filter which
+stream records will be output.
+See also: https://miller.readthedocs.io/en/latest/reference-verbs
+
 Options:
 -f {file name} File containing a DSL expression (see examples below). If the filename
    is a directory, all *.mlr files in that directory are loaded.
@@ -2301,6 +2305,9 @@ Options:
 
 Usage: mlr put [options] {DSL expression}
+Lets you use a domain-specific language to progamatically alter stream records.
+See also: https://miller.readthedocs.io/en/latest/reference-verbs
+
 Options:
 -f {file name} File containing a DSL expression (see examples below). If the filename
    is a directory, all *.mlr files in that directory are loaded.
diff --git a/man/manpage.txt b/man/manpage.txt
index 15c9d6232b..5f16957013 100644
--- a/man/manpage.txt
+++ b/man/manpage.txt
@@ -783,6 +783,7 @@
                csv      ","    N/A    "\n"
                csvlite  ","    N/A    "\n"
                dkvp     ","    "="    "\n"
+               gen      ","    N/A    "\n"
                json     N/A    N/A    N/A
                markdown " "    N/A    "\n"
                nidx     " "    N/A    "\n"
@@ -1051,6 +1052,10 @@
 
    1mfilter0m
        Usage: mlr filter [options] {DSL expression}
+       Lets you use a domain-specific language to progamatically filter which
+       stream records will be output.
+       See also: https://miller.readthedocs.io/en/latest/reference-verbs
+
        Options:
        -f {file name} File containing a DSL expression (see examples below). If the filename
           is a directory, all *.mlr files in that directory are loaded.
@@ -1504,6 +1509,9 @@
 
    1mput0m
        Usage: mlr put [options] {DSL expression}
+       Lets you use a domain-specific language to progamatically alter stream records.
+       See also: https://miller.readthedocs.io/en/latest/reference-verbs
+
        Options:
        -f {file name} File containing a DSL expression (see examples below). If the filename
           is a directory, all *.mlr files in that directory are loaded.
@@ -3683,4 +3691,4 @@
        MIME Type for Comma-Separated Values (CSV) Files, the Miller docsite
        https://miller.readthedocs.io
 
-                                  2024-02-18                         4mMILLER24m(1)
+                                  2024-03-16                         4mMILLER24m(1)
diff --git a/man/mlr.1 b/man/mlr.1
index 505cb8d082..9c78a653a1 100644
--- a/man/mlr.1
+++ b/man/mlr.1
@@ -2,12 +2,12 @@
 .\"     Title: mlr
 .\"    Author: [see the "AUTHOR" section]
 .\" Generator: ./mkman.rb
-.\"      Date: 2024-02-18
+.\"      Date: 2024-03-16
 .\"    Manual: \ \&
 .\"    Source: \ \&
 .\"  Language: English
 .\"
-.TH "MILLER" "1" "2024-02-18" "\ \&" "\ \&"
+.TH "MILLER" "1" "2024-03-16" "\ \&" "\ \&"
 .\" -----------------------------------------------------------------
 .\" * Portability definitions
 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -936,6 +936,7 @@ Notes about all other separators:
         csv      ","    N/A    "\en"
         csvlite  ","    N/A    "\en"
         dkvp     ","    "="    "\en"
+        gen      ","    N/A    "\en"
         json     N/A    N/A    N/A
         markdown " "    N/A    "\en"
         nidx     " "    N/A    "\en"
@@ -1314,6 +1315,10 @@ Options:
 .\}
 .nf
 Usage: mlr filter [options] {DSL expression}
+Lets you use a domain-specific language to progamatically filter which
+stream records will be output.
+See also: https://miller.readthedocs.io/en/latest/reference-verbs
+
 Options:
 -f {file name} File containing a DSL expression (see examples below). If the filename
    is a directory, all *.mlr files in that directory are loaded.
@@ -1899,6 +1904,9 @@ Options:
 .\}
 .nf
 Usage: mlr put [options] {DSL expression}
+Lets you use a domain-specific language to progamatically alter stream records.
+See also: https://miller.readthedocs.io/en/latest/reference-verbs
+
 Options:
 -f {file name} File containing a DSL expression (see examples below). If the filename
    is a directory, all *.mlr files in that directory are loaded.