unofficial mirror of meta@public-inbox.org
 help / color / mirror / Atom feed
* [PATCH 0/2] doc: initial lei manpages
@ 2021-02-01  5:57 Kyle Meyer
  2021-02-01  5:57 ` [PATCH 1/2] doc: start manpages for lei commands Kyle Meyer
  2021-02-01  5:57 ` [PATCH 2/2] doc: add lei-overview(7) Kyle Meyer
  0 siblings, 2 replies; 13+ messages in thread
From: Kyle Meyer @ 2021-02-01  5:57 UTC (permalink / raw)
  To: meta

Prompted by <20210124120217.GA12880@dcvr>, here's my attempt to start
lei's manpages.  The first patch adds a manpage for lei and each of
its currently implemented subcommands.  The second patch adds an
overview/quickstart.

I'm not really sure this is in a good state.  I ran out of time to
give it a complete read-through, I feel like it may need a bit more
flesh just to be a good _start_, and I probably injected a good amount
of my own confusion into them.  Anyway, it still may be useful to get
feedback on, especially because I probably won't be able to work on it
in the next couple of days.

  [1/2] doc: start manpages for lei commands
  [2/2] doc: add lei-overview(7)

 Documentation/.gitignore              |   1 +
 Documentation/lei-add-external.pod    |  49 ++++++++++
 Documentation/lei-config.pod          |  26 ++++++
 Documentation/lei-daemon-kill.pod     |  28 ++++++
 Documentation/lei-daemon-pid.pod      |  28 ++++++
 Documentation/lei-forget-external.pod |  40 ++++++++
 Documentation/lei-init.pod            |  42 +++++++++
 Documentation/lei-ls-external.pod     |  38 ++++++++
 Documentation/lei-overview.pod        |  72 +++++++++++++++
 Documentation/lei-q.pod               | 127 ++++++++++++++++++++++++++
 Documentation/lei.pod                 |  90 ++++++++++++++++++
 Documentation/txt2pre                 |  12 ++-
 MANIFEST                              |  10 ++
 Makefile.PL                           |   7 +-
 14 files changed, 567 insertions(+), 3 deletions(-)
 create mode 100644 Documentation/lei-add-external.pod
 create mode 100644 Documentation/lei-config.pod
 create mode 100644 Documentation/lei-daemon-kill.pod
 create mode 100644 Documentation/lei-daemon-pid.pod
 create mode 100644 Documentation/lei-forget-external.pod
 create mode 100644 Documentation/lei-init.pod
 create mode 100644 Documentation/lei-ls-external.pod
 create mode 100644 Documentation/lei-overview.pod
 create mode 100644 Documentation/lei-q.pod
 create mode 100644 Documentation/lei.pod


base-commit: dd1a1bceb56692722b1fb4a27391c80307403d86
-- 
2.30.0


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH 1/2] doc: start manpages for lei commands
  2021-02-01  5:57 [PATCH 0/2] doc: initial lei manpages Kyle Meyer
@ 2021-02-01  5:57 ` Kyle Meyer
  2021-02-06  9:01   ` lei-q doc thoughts... [was: doc: start manpages for lei commands] Eric Wong
  2021-02-07 19:58   ` lei q --output vs --mfolder [was: [PATCH 1/2] " Eric Wong
  2021-02-01  5:57 ` [PATCH 2/2] doc: add lei-overview(7) Kyle Meyer
  1 sibling, 2 replies; 13+ messages in thread
From: Kyle Meyer @ 2021-02-01  5:57 UTC (permalink / raw)
  To: meta

Add manpages for lei and the currently implemented subcommands.  The
included options and their descriptions follow to a large degree the
--help output, dropping some options that are not currently wired up.
---
 Documentation/.gitignore              |   1 +
 Documentation/lei-add-external.pod    |  49 ++++++++++
 Documentation/lei-config.pod          |  26 ++++++
 Documentation/lei-daemon-kill.pod     |  28 ++++++
 Documentation/lei-daemon-pid.pod      |  28 ++++++
 Documentation/lei-forget-external.pod |  40 ++++++++
 Documentation/lei-init.pod            |  42 +++++++++
 Documentation/lei-ls-external.pod     |  38 ++++++++
 Documentation/lei-q.pod               | 127 ++++++++++++++++++++++++++
 Documentation/lei.pod                 |  90 ++++++++++++++++++
 Documentation/txt2pre                 |  11 ++-
 MANIFEST                              |   9 ++
 Makefile.PL                           |   5 +-
 13 files changed, 492 insertions(+), 2 deletions(-)
 create mode 100644 Documentation/lei-add-external.pod
 create mode 100644 Documentation/lei-config.pod
 create mode 100644 Documentation/lei-daemon-kill.pod
 create mode 100644 Documentation/lei-daemon-pid.pod
 create mode 100644 Documentation/lei-forget-external.pod
 create mode 100644 Documentation/lei-init.pod
 create mode 100644 Documentation/lei-ls-external.pod
 create mode 100644 Documentation/lei-q.pod
 create mode 100644 Documentation/lei.pod

diff --git a/Documentation/.gitignore b/Documentation/.gitignore
index 92510039..142bce32 100644
--- a/Documentation/.gitignore
+++ b/Documentation/.gitignore
@@ -1,3 +1,4 @@
+/lei*.txt
 /public-inbox-*.txt
 /public-inbox.cgi.txt
 /standards.txt
diff --git a/Documentation/lei-add-external.pod b/Documentation/lei-add-external.pod
new file mode 100644
index 00000000..dd87be62
--- /dev/null
+++ b/Documentation/lei-add-external.pod
@@ -0,0 +1,49 @@
+=head1 NAME
+
+lei-add-external - add inbox or external index
+
+=head1 SYNOPSIS
+
+lei add-external [OPTIONS] URL_OR_PATHNAME
+
+=head1 DESCRIPTION
+
+Configure lei to search against an external (an inbox or external
+index).  When C<URL_OR_PATHNAME> is a local path, it should point to a
+directory that is a C<public.<name>.inboxdir> or
+C<extindex.<name>.topdir> value in ~/.public-inbox/config.
+
+=head1 OPTIONS
+
+=over
+
+=item --boost=NUMBER
+
+Set priority of a new or existing location.
+
+Default: 0
+
+=back
+
+=head1 FILES
+
+The configuration for lei resides at C<$XDG_CONFIG_HOME/lei/config>.
+
+=head1 CONTACT
+
+Feedback welcome via plain-text mail to L<mailto:meta@public-inbox.org>
+
+The mail archives are hosted at L<https://public-inbox.org/meta/>
+and L<http://hjrcffqmbrq6wope.onion/meta/>
+
+=head1 COPYRIGHT
+
+Copyright 2021 all contributors L<mailto:meta@public-inbox.org>
+
+License: AGPL-3.0+ L<https://www.gnu.org/licenses/agpl-3.0.txt>
+
+=head1 SEE ALSO
+
+L<lei-forget-external(1)>, L<lei-ls-external(1)>,
+L<public-inbox-index(1)>, L<public-inbox-extindex(1)>,
+L<public-inbox-extindex-format(5)>
diff --git a/Documentation/lei-config.pod b/Documentation/lei-config.pod
new file mode 100644
index 00000000..b6d8bfde
--- /dev/null
+++ b/Documentation/lei-config.pod
@@ -0,0 +1,26 @@
+=head1 NAME
+
+lei-config - git-config wrapper for lei configuration file
+
+=head1 SYNOPSIS
+
+lei config [OPTIONS]
+
+=head1 DESCRIPTION
+
+Call git-config(1) with C<$XDG_CONFIG_HOME/lei/config> as the
+configuration file.  All C<OPTIONS> are passed through, but those that
+override the configuration file are not permitted.
+
+=head1 CONTACT
+
+Feedback welcome via plain-text mail to L<mailto:meta@public-inbox.org>
+
+The mail archives are hosted at L<https://public-inbox.org/meta/>
+and L<http://hjrcffqmbrq6wope.onion/meta/>
+
+=head1 COPYRIGHT
+
+Copyright 2021 all contributors L<mailto:meta@public-inbox.org>
+
+License: AGPL-3.0+ L<https://www.gnu.org/licenses/agpl-3.0.txt>
diff --git a/Documentation/lei-daemon-kill.pod b/Documentation/lei-daemon-kill.pod
new file mode 100644
index 00000000..b369d3b3
--- /dev/null
+++ b/Documentation/lei-daemon-kill.pod
@@ -0,0 +1,28 @@
+=head1 NAME
+
+lei-daemon-kill - signal the lei-daemon
+
+=head1 SYNOPSIS
+
+lei daemon-kill [-SIGNAL | -s SIGNAL | --signal SIGNAL]
+
+=head1 DESCRIPTION
+
+Send a signal to the lei-daemon.  C<SIGNAL> defaults to C<TERM>.
+
+=head1 CONTACT
+
+Feedback welcome via plain-text mail to L<mailto:meta@public-inbox.org>
+
+The mail archives are hosted at L<https://public-inbox.org/meta/>
+and L<http://hjrcffqmbrq6wope.onion/meta/>
+
+=head1 COPYRIGHT
+
+Copyright 2021 all contributors L<mailto:meta@public-inbox.org>
+
+License: AGPL-3.0+ L<https://www.gnu.org/licenses/agpl-3.0.txt>
+
+=head1 SEE ALSO
+
+L<lei-daemon-pid(1)>
diff --git a/Documentation/lei-daemon-pid.pod b/Documentation/lei-daemon-pid.pod
new file mode 100644
index 00000000..09de8b42
--- /dev/null
+++ b/Documentation/lei-daemon-pid.pod
@@ -0,0 +1,28 @@
+=head1 NAME
+
+lei-daemon-pid - show the PID of the lei-daemon
+
+=head1 SYNOPSIS
+
+lei daemon-pid
+
+=head1 DESCRIPTION
+
+Show the PID of the lei-daemon.
+
+=head1 CONTACT
+
+Feedback welcome via plain-text mail to L<mailto:meta@public-inbox.org>
+
+The mail archives are hosted at L<https://public-inbox.org/meta/>
+and L<http://hjrcffqmbrq6wope.onion/meta/>
+
+=head1 COPYRIGHT
+
+Copyright 2021 all contributors L<mailto:meta@public-inbox.org>
+
+License: AGPL-3.0+ L<https://www.gnu.org/licenses/agpl-3.0.txt>
+
+=head1 SEE ALSO
+
+L<lei-daemon-kill(1)>
diff --git a/Documentation/lei-forget-external.pod b/Documentation/lei-forget-external.pod
new file mode 100644
index 00000000..40287bd3
--- /dev/null
+++ b/Documentation/lei-forget-external.pod
@@ -0,0 +1,40 @@
+=head1 NAME
+
+lei-forget-external - forget external locations
+
+=head1 SYNOPSIS
+
+lei forget-external [OPTIONS] URL_OR_PATHNAME [URL_OR_PATHNAME...]
+
+=head1 DESCRIPTION
+
+Forget the specified externals by removing their entries from
+C<$XDG_CONFIG_HOME/lei/config>.  This excludes the locations from
+future search results.
+
+=head1 OPTIONS
+
+=over
+
+=item -q, --quiet
+
+Suppress feedback messages.
+
+=back
+
+=head1 CONTACT
+
+Feedback welcome via plain-text mail to L<mailto:meta@public-inbox.org>
+
+The mail archives are hosted at L<https://public-inbox.org/meta/>
+and L<http://hjrcffqmbrq6wope.onion/meta/>
+
+=head1 COPYRIGHT
+
+Copyright 2021 all contributors L<mailto:meta@public-inbox.org>
+
+License: AGPL-3.0+ L<https://www.gnu.org/licenses/agpl-3.0.txt>
+
+=head1 SEE ALSO
+
+L<lei-add-external(1)>, L<lei-ls-external(1)>
diff --git a/Documentation/lei-init.pod b/Documentation/lei-init.pod
new file mode 100644
index 00000000..8a8022fb
--- /dev/null
+++ b/Documentation/lei-init.pod
@@ -0,0 +1,42 @@
+=head1 NAME
+
+lei-init - initialize storage
+
+=head1 SYNOPSIS
+
+lei init [OPTIONS] [PATHNAME]
+
+=head1 DESCRIPTION
+
+Initialize local writable storage for L<lei(1)>.  If C<PATHNAME> is
+unspecified, the storage is created at C<$XDG_DATA_HOME/lei/store>.
+C<leistore.dir> in C<$XDG_CONFIG_HOME/lei/config> records this
+location.
+
+=head1 OPTIONS
+
+=over
+
+=item -q, --quiet
+
+Suppress feedback messages.
+
+=back
+
+=head1 CONTACT
+
+Feedback welcome via plain-text mail to L<mailto:meta@public-inbox.org>
+
+The mail archives are hosted at L<https://public-inbox.org/meta/>
+and L<http://hjrcffqmbrq6wope.onion/meta/>
+
+=head1 COPYRIGHT
+
+Copyright 2021 all contributors L<mailto:meta@public-inbox.org>
+
+License: AGPL-3.0+ L<https://www.gnu.org/licenses/agpl-3.0.txt>
+
+
+=head1 SEE ALSO
+
+L<lei-add-external(1)>
diff --git a/Documentation/lei-ls-external.pod b/Documentation/lei-ls-external.pod
new file mode 100644
index 00000000..1735faa9
--- /dev/null
+++ b/Documentation/lei-ls-external.pod
@@ -0,0 +1,38 @@
+=head1 NAME
+
+lei-ls-external - list inbox and external index locations
+
+=head1 SYNOPSIS
+
+lei ls-external [OPTIONS]
+
+=head1 DESCRIPTION
+
+List configured externals.
+
+=head1 OPTIONS
+
+=over
+
+=item -z, -0
+
+Use C<\0> (NUL) instead of newline (CR) to delimit lines.
+
+=back
+
+=head1 CONTACT
+
+Feedback welcome via plain-text mail to L<mailto:meta@public-inbox.org>
+
+The mail archives are hosted at L<https://public-inbox.org/meta/>
+and L<http://hjrcffqmbrq6wope.onion/meta/>
+
+=head1 COPYRIGHT
+
+Copyright 2021 all contributors L<mailto:meta@public-inbox.org>
+
+License: AGPL-3.0+ L<https://www.gnu.org/licenses/agpl-3.0.txt>
+
+=head1 SEE ALSO
+
+L<lei-add-external(1)>, L<lei-forget-external(1)>
diff --git a/Documentation/lei-q.pod b/Documentation/lei-q.pod
new file mode 100644
index 00000000..e307e020
--- /dev/null
+++ b/Documentation/lei-q.pod
@@ -0,0 +1,127 @@
+=head1 NAME
+
+lei-q - search for messages matching terms
+
+=head1 SYNOPSIS
+
+lei q [OPTIONS] TERM [TERM...]
+
+=head1 DESCRIPTION
+
+Search for messages across the lei store and externals.
+
+TODO: Give common prefixes, or at least a description/reference.
+
+=head1 OPTIONS
+
+=over
+
+=item -o PATH, --output=PATH, --mfolder=PATH
+
+Destination for results (e.g., C<path/to/Maildir> or - for stdout).
+
+Default: -
+
+=item -f FORMAT, --format=FORMAT
+
+Format of results: C<maildir>, C<mboxrd>, C<mboxcl2>, C<mboxcl>,
+C<mboxo>, C<json>, C<jsonl>, or C<concatjson>.  The default format
+used depends on C<--output>.
+
+TODO: Provide description of formats?
+
+=item --pretty
+
+Pretty print C<json> or C<concatjson> output.  If stdout is opened to
+a tty and used as the C<--output> destination, C<--pretty> is enabled
+by default.
+
+=item --mua-cmd=COMMAND, --mua=COMMAND
+
+A command to run on C<--output> Maildir or mbox (e.g., C<mutt -f %f>).
+For a subset of MUAs known to accept a mailbox via C<-f>, COMMAND can
+be abbreviated to the name of the program: C<mutt>, C<mailx>, C<mail>,
+or C<neomutt>.
+
+=item --augment
+
+Augment output destination instead of clobbering it.
+
+=item -t, --thread
+
+Return all messages in the same thread as the actual match(es).
+
+=item -d STRATEGY, --dedupe=STRATEGY
+
+Strategy for deduplicating messages: C<content>, C<oid>, C<mid>, or
+C<none>.
+
+Default: C<content>
+
+TODO: Provide description of strategies?
+
+=item --[no-]remote
+
+Whether to include results requiring network access.  When local
+externals are configured, C<--remote> must be explicitly passed to
+enable reporting of results from remote externals.
+
+=item --no-local
+
+Limit operations to those requiring network access.
+
+=item --no-external
+
+Don't include results from externals.
+
+=item -NUMBER, -n NUMBER, --limit=NUMBER
+
+Limit the number of matches.
+
+Default: 10000
+
+=item --offset=NUMBER
+
+Shift start of search results.
+
+Default: 0
+
+=item -r, --reverse
+
+Reverse the results.  Note that this applies before C<--limit>.
+
+=item -s KEY, --sort=KEY
+
+Order the results by KEY.  Valid keys are C<received>, C<relevance>,
+and C<docid>.
+
+Default: C<received>
+
+=item -v, --verbose
+
+Provide more feedback on stderr.
+
+=item --torsocks=auto|no|yes, --no-torsocks
+
+Whether to wrap L<git(1)> and L<curl(1)> commands with torsocks.
+
+Default: C<auto>
+
+=back
+
+=head1 CONTACT
+
+Feedback welcome via plain-text mail to L<mailto:meta@public-inbox.org>
+
+The mail archives are hosted at L<https://public-inbox.org/meta/>
+and L<http://hjrcffqmbrq6wope.onion/meta/>
+
+=head1 COPYRIGHT
+
+Copyright 2021 all contributors L<mailto:meta@public-inbox.org>
+
+License: AGPL-3.0+ L<https://www.gnu.org/licenses/agpl-3.0.txt>
+
+=head1 SEE ALSO
+
+L<lei-add-external(1)>
diff --git a/Documentation/lei.pod b/Documentation/lei.pod
new file mode 100644
index 00000000..e12a157d
--- /dev/null
+++ b/Documentation/lei.pod
@@ -0,0 +1,90 @@
+=head1 NAME
+
+lei - local email interface for public-inbox
+
+=head1 SYNOPSIS
+
+lei COMMAND
+
+=head1 DESCRIPTION
+
+Unlike the C10K-oriented L<public-inbox-daemon(8)>, lei is designed
+exclusively to handle trusted local clients with read/write access to
+the file system, using as many system resources as the local user has
+access to.  lei supports a local, writable store built on top of
+L<public-inbox-v2-format(5)> and L<public-inbox-extindex(1)>.
+L<lei-q(1)> provides an interface for querying messages across the lei
+store and read-only local and remote "externals" (inboxes and external
+indices).
+
+Available in public-inbox 1.7.0+.
+
+=head1 COMMANDS
+
+Subcommands for initializing and managing local, writable storage:
+
+=over
+
+=item * L<lei-init(1)>
+
+=back
+
+TODO: Add commands like lei-import once they're implemented.
+
+The following subcommands can be used to manage and inspect external
+locations:
+
+=over
+
+=item * L<lei-add-external(1)>
+
+=item * L<lei-forget-external(1)>
+
+=item * L<lei-ls-external(1)>
+
+=back
+
+Subcommands related to searching and inspecting messages from the lei
+store and configured externals are
+
+=over
+
+=item * L<lei-q(1)>
+
+=back
+
+TODO: Add lei-show (and perhaps others) once implemented.
+
+Other subcommands include
+
+=over
+
+=item * L<lei-config(1)>
+
+=item * L<lei-daemon-kill(1)>
+
+=item * L<lei-daemon-pid(1)>
+
+=back
+
+=head1 FILES
+
+By default storage is located at C<$XDG_DATA_HOME/lei/store>.  The
+configuration for lei resides at C<$XDG_CONFIG_HOME/lei/config>.
+
+=head1 CONTACT
+
+Feedback welcome via plain-text mail to L<mailto:meta@public-inbox.org>
+
+The mail archives are hosted at L<https://public-inbox.org/meta/>
+and L<http://hjrcffqmbrq6wope.onion/meta/>
+
+=head1 COPYRIGHT
+
+Copyright 2021 all contributors L<mailto:meta@public-inbox.org>
+
+License: AGPL-3.0+ L<https://www.gnu.org/licenses/agpl-3.0.txt>
+
+=head1 SEE ALSO
+
+L<lei-overview(7)>
diff --git a/Documentation/txt2pre b/Documentation/txt2pre
index 75e4725c..f69323e1 100755
--- a/Documentation/txt2pre
+++ b/Documentation/txt2pre
@@ -10,7 +10,16 @@ use warnings;
 use PublicInbox::Linkify;
 use PublicInbox::Hval qw(ascii_html);
 my %xurls;
-for (qw[public-inbox.cgi(1)
+for (qw[lei(1)
+	lei-add-external(1)
+	lei-config(1)
+	lei-daemon-kill(1)
+	lei-daemon-pid(1)
+	lei-forget-external(1)
+	lei-init(1)
+	lei-ls-external(1)
+	lei-q(1)
+	public-inbox.cgi(1)
 	public-inbox-compact(1)
 	public-inbox-config(5)
 	public-inbox-convert(1)
diff --git a/MANIFEST b/MANIFEST
index 2077ab12..4d6f8b43 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -21,6 +21,15 @@ Documentation/flow.ge
 Documentation/flow.txt
 Documentation/hosted.txt
 Documentation/include.mk
+Documentation/lei-add-external.pod
+Documentation/lei-config.pod
+Documentation/lei-daemon-kill.pod
+Documentation/lei-daemon-pid.pod
+Documentation/lei-forget-external.pod
+Documentation/lei-init.pod
+Documentation/lei-ls-external.pod
+Documentation/lei-q.pod
+Documentation/lei.pod
 Documentation/marketing.txt
 Documentation/mknews.perl
 Documentation/public-inbox-compact.pod
diff --git a/Makefile.PL b/Makefile.PL
index b2f3393d..7bfe1e4e 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -42,7 +42,10 @@ $v->{-m1} = [ map {
 			push @no_pod, $x;
 			();
 		}
-	} @EXE_FILES ];
+	} @EXE_FILES,
+	qw(
+	lei-add-external lei-config lei-daemon-kill lei-daemon-pid
+	lei-forget-external lei-init lei-ls-external lei-q)];
 $v->{-m5} = [ qw(public-inbox-config public-inbox-v1-format
 		public-inbox-v2-format public-inbox-extindex-format) ];
 $v->{-m7} = [ qw(public-inbox-overview public-inbox-tuning) ];
-- 
2.30.0


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 2/2] doc: add lei-overview(7)
  2021-02-01  5:57 [PATCH 0/2] doc: initial lei manpages Kyle Meyer
  2021-02-01  5:57 ` [PATCH 1/2] doc: start manpages for lei commands Kyle Meyer
@ 2021-02-01  5:57 ` Kyle Meyer
  2021-02-01  6:40   ` Eric Wong
  1 sibling, 1 reply; 13+ messages in thread
From: Kyle Meyer @ 2021-02-01  5:57 UTC (permalink / raw)
  To: meta

---
 Documentation/lei-overview.pod | 72 ++++++++++++++++++++++++++++++++++
 Documentation/txt2pre          |  1 +
 MANIFEST                       |  1 +
 Makefile.PL                    |  2 +-
 4 files changed, 75 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/lei-overview.pod

diff --git a/Documentation/lei-overview.pod b/Documentation/lei-overview.pod
new file mode 100644
index 00000000..988896ce
--- /dev/null
+++ b/Documentation/lei-overview.pod
@@ -0,0 +1,72 @@
+=head1 NAME
+
+lei - an overview of lei
+
+=head1 DESCRIPTION
+
+L<lei(1)> is a local email interface for public-inbox.  This document
+provides some basic examples.
+
+=head1 LEI STORE
+
+L<lei-init(1)> initializes writable local storage based on
+L<public-inbox-v2-format(5)>.
+
+TODO: Extend when lei-import and friends are added.
+
+=head1 EXTERNALS
+
+In addition to the above store, lei can make read-only queries to
+"externals": inboxes and external indices.  An external can be
+registered by passing a URL or local path to L<lei-add-external(1)>.
+For local paths, the external needs to be indexed with
+L<public-inbox-index(1)> (in the case of a regular inbox) or
+L<public-inbox-extindex(1)> (in the case of an external index).
+
+=head2 EXAMPLES
+
+=over
+
+=item $ lei add-external https://public-inbox.org/meta/
+
+Add a remote external for public-inbox's inbox.
+
+=back
+
+=head1 SEARCHING
+
+The L<lei-q(1)> command searches the local store and externals.  The
+search prefixes match those available via L<public-inbox-httpd(1)>.
+
+=head2 EXAMPLES
+
+=over
+
+=item $ lei q s:lei s:skeleton
+
+Search for messages whose subject includes "lei" and "skeleton".
+
+=item $ lei q -t s:lei s:skeleton
+
+Do the same, but also report unmatched messages that are in the same
+thread as a matched message.
+
+=item $ lei q -t -o t.mbox --format mboxrd --mua=mutt s:lei s:skeleton
+
+Write mboxrd-formatted results to t.mbox and enter mutt to view the
+file by invoking C<mutt -f %f>.
+
+=back
+
+=head1 CONTACT
+
+Feedback welcome via plain-text mail to L<mailto:meta@public-inbox.org>
+
+The mail archives are hosted at L<https://public-inbox.org/meta/>
+and L<http://hjrcffqmbrq6wope.onion/meta/>
+
+=head1 COPYRIGHT
+
+Copyright 2021 all contributors L<mailto:meta@public-inbox.org>
+
+License: AGPL-3.0+ L<https://www.gnu.org/licenses/agpl-3.0.txt>
diff --git a/Documentation/txt2pre b/Documentation/txt2pre
index f69323e1..604490ef 100755
--- a/Documentation/txt2pre
+++ b/Documentation/txt2pre
@@ -18,6 +18,7 @@ for (qw[lei(1)
 	lei-forget-external(1)
 	lei-init(1)
 	lei-ls-external(1)
+	lei-overview(7)
 	lei-q(1)
 	public-inbox.cgi(1)
 	public-inbox-compact(1)
diff --git a/MANIFEST b/MANIFEST
index 4d6f8b43..56fde540 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -28,6 +28,7 @@ Documentation/lei-daemon-pid.pod
 Documentation/lei-forget-external.pod
 Documentation/lei-init.pod
 Documentation/lei-ls-external.pod
+Documentation/lei-overview.pod
 Documentation/lei-q.pod
 Documentation/lei.pod
 Documentation/marketing.txt
diff --git a/Makefile.PL b/Makefile.PL
index 7bfe1e4e..f1910c47 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -48,7 +48,7 @@ $v->{-m1} = [ map {
 	lei-forget-external lei-init lei-ls-external lei-q)];
 $v->{-m5} = [ qw(public-inbox-config public-inbox-v1-format
 		public-inbox-v2-format public-inbox-extindex-format) ];
-$v->{-m7} = [ qw(public-inbox-overview public-inbox-tuning) ];
+$v->{-m7} = [ qw(lei-overview public-inbox-overview public-inbox-tuning) ];
 $v->{-m8} = [ qw(public-inbox-daemon) ];
 my @sections = (1, 5, 7, 8);
 $v->{check_80} = [];
-- 
2.30.0


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [PATCH 2/2] doc: add lei-overview(7)
  2021-02-01  5:57 ` [PATCH 2/2] doc: add lei-overview(7) Kyle Meyer
@ 2021-02-01  6:40   ` Eric Wong
  2021-02-01 11:37     ` Eric Wong
  0 siblings, 1 reply; 13+ messages in thread
From: Eric Wong @ 2021-02-01  6:40 UTC (permalink / raw)
  To: Kyle Meyer; +Cc: meta

Kyle Meyer <kyle@kyleam.com> wrote:
> +=item $ lei q -t -o t.mbox --format mboxrd --mua=mutt s:lei s:skeleton
> 
> +Write mboxrd-formatted results to t.mbox and enter mutt to view the
> +file by invoking C<mutt -f %f>.

Thanks for this series.  I'll take a closer look later (or
tomorrow)

mutt actually uses mboxcl2, so it's probably better to use
mboxcl2 in examples involving mutt.  I would also prefer "-f" in
examples if the rest of the args are using short switches.

No need to resend just for that, I can fix up locally before
pushing.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 2/2] doc: add lei-overview(7)
  2021-02-01  6:40   ` Eric Wong
@ 2021-02-01 11:37     ` Eric Wong
  0 siblings, 0 replies; 13+ messages in thread
From: Eric Wong @ 2021-02-01 11:37 UTC (permalink / raw)
  To: Kyle Meyer; +Cc: meta

Eric Wong <e@80x24.org> wrote:
> Kyle Meyer <kyle@kyleam.com> wrote:
> > +=item $ lei q -t -o t.mbox --format mboxrd --mua=mutt s:lei s:skeleton
> > 
> > +Write mboxrd-formatted results to t.mbox and enter mutt to view the
> > +file by invoking C<mutt -f %f>.
> 
> Thanks for this series.  I'll take a closer look later (or
> tomorrow)

It seems fine, pushed as commit e49cf9c629c0fd3024bdb63b5c5e84b590814c4e
Thanks again

> mutt actually uses mboxcl2, so it's probably better to use
> mboxcl2 in examples involving mutt.  I would also prefer "-f" in
> examples if the rest of the args are using short switches.
> 
> No need to resend just for that, I can fix up locally before
> pushing.

diff --git a/Documentation/lei-overview.pod b/Documentation/lei-overview.pod
index 988896ce..d1903045 100644
--- a/Documentation/lei-overview.pod
+++ b/Documentation/lei-overview.pod
@@ -51,9 +51,9 @@ Search for messages whose subject includes "lei" and "skeleton".
 Do the same, but also report unmatched messages that are in the same
 thread as a matched message.
 
-=item $ lei q -t -o t.mbox --format mboxrd --mua=mutt s:lei s:skeleton
+=item $ lei q -t -o t.mbox -f mboxcl2 --mua=mutt s:lei s:skeleton
 
-Write mboxrd-formatted results to t.mbox and enter mutt to view the
+Write mboxcl2-formatted results to t.mbox and enter mutt to view the
 file by invoking C<mutt -f %f>.
 
 =back

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* lei-q doc thoughts... [was: doc: start manpages for lei commands]
  2021-02-01  5:57 ` [PATCH 1/2] doc: start manpages for lei commands Kyle Meyer
@ 2021-02-06  9:01   ` Eric Wong
  2021-02-06 19:57     ` Kyle Meyer
  2021-02-07 19:58   ` lei q --output vs --mfolder [was: [PATCH 1/2] " Eric Wong
  1 sibling, 1 reply; 13+ messages in thread
From: Eric Wong @ 2021-02-06  9:01 UTC (permalink / raw)
  To: Kyle Meyer; +Cc: meta

Kyle Meyer <kyle@kyleam.com> wrote:
> +=item --mua-cmd=COMMAND, --mua=COMMAND

On second thought:  is the long "--mua-cmd" even worth having or
supporting given "--mua=" exists?  I will likely remove it from
the documentation and filter it out from the help text.

Technically "mua-cmd" is more descriptive since it's a command
with a %f placeholder, but I can't imagine anybody wanting to
type "--mua-cmd" over "--mua".

> +=item -t, --thread
> +
> +Return all messages in the same thread as the actual match(es).

Heh, it turns out mairix uses "--threads" (plural).  I never
knew that since I always used "-t".  Not sure if it's worth
pluralizing on our end...

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: lei-q doc thoughts... [was: doc: start manpages for lei commands]
  2021-02-06  9:01   ` lei-q doc thoughts... [was: doc: start manpages for lei commands] Eric Wong
@ 2021-02-06 19:57     ` Kyle Meyer
  2021-02-07  3:33       ` Eric Wong
  0 siblings, 1 reply; 13+ messages in thread
From: Kyle Meyer @ 2021-02-06 19:57 UTC (permalink / raw)
  To: Eric Wong; +Cc: meta

Eric Wong writes:

> Kyle Meyer <kyle@kyleam.com> wrote:
>> +=item --mua-cmd=COMMAND, --mua=COMMAND
>
> On second thought:  is the long "--mua-cmd" even worth having or
> supporting given "--mua=" exists?  I will likely remove it from
> the documentation and filter it out from the help text.
>
> Technically "mua-cmd" is more descriptive since it's a command
> with a %f placeholder, but I can't imagine anybody wanting to
> type "--mua-cmd" over "--mua".

No, I can't either.  Dropping --mua-cmd makes sense.

>> +=item -t, --thread
>> +
>> +Return all messages in the same thread as the actual match(es).
>
> Heh, it turns out mairix uses "--threads" (plural).  I never
> knew that since I always used "-t".  Not sure if it's worth
> pluralizing on our end...

I'd vote for following mairix here.  I guess most people will use -t,
but it's just one less thing to get tripped up on.

By the way, if you'd like, I'd be happy to do a round (or more) of lei
manpage updates for new additions whenever you think things are in a
good spot for it.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: lei-q doc thoughts... [was: doc: start manpages for lei commands]
  2021-02-06 19:57     ` Kyle Meyer
@ 2021-02-07  3:33       ` Eric Wong
  0 siblings, 0 replies; 13+ messages in thread
From: Eric Wong @ 2021-02-07  3:33 UTC (permalink / raw)
  To: Kyle Meyer; +Cc: meta

Kyle Meyer <kyle@kyleam.com> wrote:
> 
> No, I can't either.  Dropping --mua-cmd makes sense.

> Eric Wong writes:
> > Heh, it turns out mairix uses "--threads" (plural).  I never
> > knew that since I always used "-t".  Not sure if it's worth
> > pluralizing on our end...
> 
> I'd vote for following mairix here.  I guess most people will use -t,
> but it's just one less thing to get tripped up on.

Thanks, I'll queue up necessary patches for those.

> By the way, if you'd like, I'd be happy to do a round (or more) of lei
> manpage updates for new additions whenever you think things are in a
> good spot for it.

Yes, much appreciated, thanks in advance :>

Anything covered by tests should be considered
ready-for-documentation, I think.  That can help us flush out
any strange/unexpected behaviors before it's finalized in a
release.

Fwiw, I'm likely to apply+push any doc-only patches as quickly as
I see them.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* lei q --output vs --mfolder [was: [PATCH 1/2] doc: start manpages for lei commands]
  2021-02-01  5:57 ` [PATCH 1/2] doc: start manpages for lei commands Kyle Meyer
  2021-02-06  9:01   ` lei-q doc thoughts... [was: doc: start manpages for lei commands] Eric Wong
@ 2021-02-07 19:58   ` Eric Wong
  2021-02-07 20:33     ` Kyle Meyer
  1 sibling, 1 reply; 13+ messages in thread
From: Eric Wong @ 2021-02-07 19:58 UTC (permalink / raw)
  To: Kyle Meyer; +Cc: meta

Kyle Meyer <kyle@kyleam.com> wrote:
> +++ b/Documentation/lei-q.pod

> +=item -o PATH, --output=PATH, --mfolder=PATH
> +
> +Destination for results (e.g., C<path/to/Maildir> or - for stdout).

Fwiw, I didn't really like the term "mfolder" but that's what
mairix users are used to...  Perhaps:

	=item -o MFOLDER, --output=MFOLDER

Or is "mfolder" not that bad and we ditch --output instead?

(mairix uses '-o', so we match it there)

I never really got used to using "folder" to describe mailboxes
or directories.  I associate "folder" with something that holds
only a few pages of paper in the physical world; not thousands
or millions of items.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: lei q --output vs --mfolder [was: [PATCH 1/2] doc: start manpages for lei commands]
  2021-02-07 19:58   ` lei q --output vs --mfolder [was: [PATCH 1/2] " Eric Wong
@ 2021-02-07 20:33     ` Kyle Meyer
  2021-02-07 20:59       ` Eric Wong
  0 siblings, 1 reply; 13+ messages in thread
From: Kyle Meyer @ 2021-02-07 20:33 UTC (permalink / raw)
  To: Eric Wong; +Cc: meta

Eric Wong writes:

> Kyle Meyer <kyle@kyleam.com> wrote:
>> +++ b/Documentation/lei-q.pod
>
>> +=item -o PATH, --output=PATH, --mfolder=PATH
>> +
>> +Destination for results (e.g., C<path/to/Maildir> or - for stdout).
>
> Fwiw, I didn't really like the term "mfolder" but that's what
> mairix users are used to...  Perhaps:
>
> 	=item -o MFOLDER, --output=MFOLDER
>
> Or is "mfolder" not that bad and we ditch --output instead?

Yeah, I don't like "mfolder" either.  In the --thread{,s} case,
consistency seemed worth it to me because either one sounded okay, and a
one character difference is easy to not notice.  But in this case, I
think --output is the better name, so if we're dropping one, I'd vote to
cast out --mfolder.

Using MFOLDER rather than PATH as the metavariable seems a bit confusing
to me because the target isn't a directory for --format values other
than "maildir".

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: lei q --output vs --mfolder [was: [PATCH 1/2] doc: start manpages for lei commands]
  2021-02-07 20:33     ` Kyle Meyer
@ 2021-02-07 20:59       ` Eric Wong
  2021-02-07 21:47         ` Kyle Meyer
  0 siblings, 1 reply; 13+ messages in thread
From: Eric Wong @ 2021-02-07 20:59 UTC (permalink / raw)
  To: Kyle Meyer; +Cc: meta

Kyle Meyer <kyle@kyleam.com> wrote:
> Eric Wong writes:
> > Kyle Meyer <kyle@kyleam.com> wrote:
> >> +++ b/Documentation/lei-q.pod
> >
> >> +=item -o PATH, --output=PATH, --mfolder=PATH
> >> +
> >> +Destination for results (e.g., C<path/to/Maildir> or - for stdout).
> >
> > Fwiw, I didn't really like the term "mfolder" but that's what
> > mairix users are used to...  Perhaps:
> >
> > 	=item -o MFOLDER, --output=MFOLDER
> >
> > Or is "mfolder" not that bad and we ditch --output instead?
> 
> Yeah, I don't like "mfolder" either.  In the --thread{,s} case,
> consistency seemed worth it to me because either one sounded okay, and a
> one character difference is easy to not notice.  But in this case, I
> think --output is the better name, so if we're dropping one, I'd vote to
> cast out --mfolder.

Alright, I'll think about dropping ...  Right now, it's still
supported, but masked out of --help output but with a "MFOLDER"
placeholder.

Perhaps a note in the man page noting it's mairix analogue is
sufficient?

> Using MFOLDER rather than PATH as the metavariable seems a bit confusing
> to me because the target isn't a directory for --format values other
> than "maildir".

Fwiw, mairix uses "mfolder" for mbox and IMAP destinations, too;
(I've never used IMAP with mairix, but have every intention of
supporting IMAP in lei).

"LOCATION" may also be a suitable placeholder *shrug*

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: lei q --output vs --mfolder [was: [PATCH 1/2] doc: start manpages for lei commands]
  2021-02-07 20:59       ` Eric Wong
@ 2021-02-07 21:47         ` Kyle Meyer
  2021-02-07 21:55           ` Eric Wong
  0 siblings, 1 reply; 13+ messages in thread
From: Kyle Meyer @ 2021-02-07 21:47 UTC (permalink / raw)
  To: Eric Wong; +Cc: meta

Eric Wong writes:

> Kyle Meyer <kyle@kyleam.com> wrote:
[...]
>> But in this case, I think --output is the better name, so if we're
>> dropping one, I'd vote to cast out --mfolder.
>
> Alright, I'll think about dropping ...  Right now, it's still
> supported, but masked out of --help output but with a "MFOLDER"
> placeholder.
>
> Perhaps a note in the man page noting it's mairix analogue is
> sufficient?

As someone that has only looked into mairix a few times but not used it,
I'd find the pointer helpful, I think.

>> Using MFOLDER rather than PATH as the metavariable seems a bit confusing
>> to me because the target isn't a directory for --format values other
>> than "maildir".
>
> Fwiw, mairix uses "mfolder" for mbox and IMAP destinations, too;
> (I've never used IMAP with mairix, but have every intention of
> supporting IMAP in lei).
>
> "LOCATION" may also be a suitable placeholder *shrug*

Oh, IMAP destinations.  So PATH isn't a great choice then.  In that
case, switching to MFOLDER or LOCATION as the placeholder sounds fine to
me.  I guess MFOLDER would be good at this point for consistency with `q
--help'.  I've made a note to do that when updating the lei manpages
(hope to get to that tomorrow or the next day) assuming you haven't
handle it before then.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: lei q --output vs --mfolder [was: [PATCH 1/2] doc: start manpages for lei commands]
  2021-02-07 21:47         ` Kyle Meyer
@ 2021-02-07 21:55           ` Eric Wong
  0 siblings, 0 replies; 13+ messages in thread
From: Eric Wong @ 2021-02-07 21:55 UTC (permalink / raw)
  To: Kyle Meyer; +Cc: meta

Kyle Meyer <kyle@kyleam.com> wrote:
> Eric Wong writes:
> > Fwiw, mairix uses "mfolder" for mbox and IMAP destinations, too;
> > (I've never used IMAP with mairix, but have every intention of
> > supporting IMAP in lei).
> >
> > "LOCATION" may also be a suitable placeholder *shrug*
> 
> Oh, IMAP destinations.  So PATH isn't a great choice then.  In that
> case, switching to MFOLDER or LOCATION as the placeholder sounds fine to
> me.  I guess MFOLDER would be good at this point for consistency with `q
> --help'.  I've made a note to do that when updating the lei manpages
> (hope to get to that tomorrow or the next day) assuming you haven't
> handle it before then.

Right, I started using LOCATION for external inboxes instead of
"URL_OR_PATH" in --help; so MFOLDER may help disambiguate it for
non-external destinations.

Thanks again for tackling the doc stuff; I'll leave the .pod
untouched for now to avoid conflicts.  I have an aversion to all
mark{up,down} languages, thus it's most natural for me to
document stuff in commit messages, --help text and emails :>

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2021-02-07 21:55 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-01  5:57 [PATCH 0/2] doc: initial lei manpages Kyle Meyer
2021-02-01  5:57 ` [PATCH 1/2] doc: start manpages for lei commands Kyle Meyer
2021-02-06  9:01   ` lei-q doc thoughts... [was: doc: start manpages for lei commands] Eric Wong
2021-02-06 19:57     ` Kyle Meyer
2021-02-07  3:33       ` Eric Wong
2021-02-07 19:58   ` lei q --output vs --mfolder [was: [PATCH 1/2] " Eric Wong
2021-02-07 20:33     ` Kyle Meyer
2021-02-07 20:59       ` Eric Wong
2021-02-07 21:47         ` Kyle Meyer
2021-02-07 21:55           ` Eric Wong
2021-02-01  5:57 ` [PATCH 2/2] doc: add lei-overview(7) Kyle Meyer
2021-02-01  6:40   ` Eric Wong
2021-02-01 11:37     ` Eric Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).