From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id E60881F8C6 for ; Wed, 8 Sep 2021 18:48:20 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH] lei-rm: add man page, support LeiInput args Date: Wed, 8 Sep 2021 18:48:20 +0000 Message-Id: <20210908184820.7177-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: -F/--in-format and --lock=TYPE(S) are easily supported by all classes using LeiInput. --- Documentation/lei-rm.pod | 72 ++++++++++++++++++++++++++++++++++++++++ MANIFEST | 1 + Makefile.PL | 2 +- lib/PublicInbox/LEI.pm | 2 +- 4 files changed, 75 insertions(+), 2 deletions(-) create mode 100644 Documentation/lei-rm.pod diff --git a/Documentation/lei-rm.pod b/Documentation/lei-rm.pod new file mode 100644 index 00000000..f2a0c0f0 --- /dev/null +++ b/Documentation/lei-rm.pod @@ -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 +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, C, C, C, C, +C, C, C, C, or C. + +Default: C when reading from stdin + +=item --lock=METHOD + +L locking method(s) to use: C, C, C or +C. + +Default: fcntl,dotlock + +=item -q + +=item --quiet + +Suppress feedback messages. + +=back + +=head1 CONTACT + +Feedback welcome via plain-text mail to L + +The mail archives are hosted at L and +L + +=head1 COPYRIGHT + +Copyright all contributors L + +License: AGPL-3.0+ L + +=head1 SEE ALSO + +L diff --git a/MANIFEST b/MANIFEST index fad29622..531f8c46 100644 --- 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 diff --git a/Makefile.PL b/Makefile.PL index 2af8c2f1..82b50543 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -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 diff --git a/lib/PublicInbox/LEI.pm b/lib/PublicInbox/LEI.pm index a258722e..3dce0236 100644 --- a/lib/PublicInbox/LEI.pm +++ b/lib/PublicInbox/LEI.pm @@ -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 ],