]> Sergey Matveev's repositories - public-inbox.git/commitdiff
lei-rm: add man page, support LeiInput args
authorEric Wong <e@80x24.org>
Wed, 8 Sep 2021 18:48:20 +0000 (18:48 +0000)
committerEric Wong <e@80x24.org>
Thu, 9 Sep 2021 04:50:33 +0000 (04:50 +0000)
-F/--in-format and --lock=TYPE(S) are easily supported by
all classes using LeiInput.

Documentation/lei-rm.pod [new file with mode: 0644]
MANIFEST
Makefile.PL
lib/PublicInbox/LEI.pm

diff --git a/Documentation/lei-rm.pod b/Documentation/lei-rm.pod
new file mode 100644 (file)
index 0000000..f2a0c0f
--- /dev/null
@@ -0,0 +1,72 @@
+=head1 NAME
+
+lei-rm - unindex a message in lei/store
+
+=head1 SYNOPSIS
+
+lei rm [OPTIONS] (-|--stdin)
+
+lei rm [OPTIONS] LOCATION
+
+=head1 DESCRIPTION
+
+Removes message(s) and associated private metadata from lei/store
+indices.  It does not affect messages stored in externals, so it's
+still possible to get "removed" messages from externals in L<lei-q>
+search results.
+
+This does not remove the message from underlying git storage nor
+does it remove messages from Maildir/mbox/IMAP/etc. sources.
+
+=head1 OPTIONS
+
+=over
+
+=item -
+
+=item --stdin
+
+Read input from standard input.  This is the default if standard
+input is a pipe or regular file and there are no arguments on
+the command-line.
+
+=item -F MAIL_FORMAT
+
+=item --in-format=MAIL_FORMAT
+
+Message input format: C<eml>, C<maildir>, C<imap>, C<imaps>, C<nntp>,
+C<nntps>, C<mboxrd>, C<mboxcl2>, C<mboxcl>, or C<mboxo>.
+
+Default: C<eml> when reading from stdin
+
+=item --lock=METHOD
+
+L<mbox(5)> locking method(s) to use: C<dotlock>, C<fcntl>, C<flock> or
+C<none>.
+
+Default: fcntl,dotlock
+
+=item -q
+
+=item --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://4uok3hntl7oi7b4uf4rtfwefqeexfzil2w6kgk2jn5z2f764irre7byd.onion/meta/>
+
+=head1 COPYRIGHT
+
+Copyright 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-store-format(5)>
index fad2962225fc914e8512b72c459edc2ae30c5c5d..531f8c46dc4b62252ac171abbfc7002f6d8479cc 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -42,6 +42,7 @@ Documentation/lei-overview.pod
 Documentation/lei-p2q.pod
 Documentation/lei-q.pod
 Documentation/lei-rediff.pod
+Documentation/lei-rm.pod
 Documentation/lei-store-format.pod
 Documentation/lei-tag.pod
 Documentation/lei-up.pod
index 2af8c2f1757dbf574940f0f24bf26f666652841b..82b50543620dffc16fc39819efb4957135232168 100644 (file)
@@ -48,7 +48,7 @@ $v->{-m1} = [ map {
        lei-add-external lei-blob lei-config lei-convert lei-edit-search
        lei-daemon-kill lei-daemon-pid lei-forget-external lei-forget-search
        lei-import lei-init lei-lcat lei-ls-external lei-ls-label
-       lei-ls-mail-sync lei-ls-search lei-p2q lei-q lei-rediff lei-tag
+       lei-ls-mail-sync lei-ls-search lei-p2q lei-q lei-rediff lei-rm lei-tag
        lei-up)];
 $v->{-m5} = [ qw(public-inbox-config public-inbox-v1-format
                public-inbox-v2-format public-inbox-extindex-format
index a258722e04d582724e567011aabd6c321e16c3a7..3dce02363286597b6106a965277b3395024978f5 100644 (file)
@@ -226,7 +226,7 @@ our %CMD = ( # sorted in order of importance/use:
 'rm' => [ '--stdin|LOCATION...',
        'remove a message from the index and prevent reindexing',
        'stdin|', # /|\z/ must be first for lone dash
-       @c_opt ],
+       qw(in-format|F=s lock=s@), @c_opt ],
 'plonk' => [ '--threads|--from=IDENT',
        'exclude mail matching From: or threads from non-Message-ID searches',
        qw(stdin| threads|t from|f=s mid=s oid=s), @c_opt ],