user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
From: Kyle Meyer <kyle@kyleam.com>
To: meta@public-inbox.org
Subject: [PATCH 3/4] doc: add lei-import(1)
Date: Wed, 10 Feb 2021 23:04:14 -0500	[thread overview]
Message-ID: <20210211040415.28557-4-kyle@kyleam.com> (raw)
In-Reply-To: <20210211040415.28557-1-kyle@kyleam.com>

---
 Documentation/lei-add-external.pod |  2 +-
 Documentation/lei-import.pod       | 54 ++++++++++++++++++++++++++++++
 Documentation/lei-overview.pod     | 10 +++++-
 Documentation/lei.pod              |  4 +--
 Documentation/txt2pre              |  1 +
 MANIFEST                           |  1 +
 Makefile.PL                        |  2 +-
 7 files changed, 69 insertions(+), 5 deletions(-)
 create mode 100644 Documentation/lei-import.pod

diff --git a/Documentation/lei-add-external.pod b/Documentation/lei-add-external.pod
index ebefb4cf..1be3f905 100644
--- a/Documentation/lei-add-external.pod
+++ b/Documentation/lei-add-external.pod
@@ -44,6 +44,6 @@ 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<lei-forget-external(1)>, L<lei-ls-external(1)>, L<lei-import(1)>,
 L<public-inbox-index(1)>, L<public-inbox-extindex(1)>,
 L<public-inbox-extindex-format(5)>
diff --git a/Documentation/lei-import.pod b/Documentation/lei-import.pod
new file mode 100644
index 00000000..14ca2d45
--- /dev/null
+++ b/Documentation/lei-import.pod
@@ -0,0 +1,54 @@
+=head1 NAME
+
+lei-import - one-time import of messages into local store
+
+=head1 SYNOPSIS
+
+lei import [OPTIONS] LOCATION [LOCATION...]
+
+lei import [OPTIONS] --stdin
+
+=head1 DESCRIPTION
+
+Import messages into the local storage of L<lei(1)>.  C<LOCATION> is a
+source of messages: a directory (Maildir) or a file (whose format is
+specified via C<--format>).
+
+TODO: Update when URL support is added.
+
+=head1 OPTIONS
+
+=over
+
+=item -f MAIL_FORMAT, --format=MAIL_FORMAT
+
+Message input format: C<eml>, C<mboxrd>, C<mboxcl2>, C<mboxcl>,
+C<mboxo>.
+
+=item --stdin
+
+Read messages from stdin.
+
+=item --no-kw, --no-keywords, --no-flags
+
+Don't import message keywords (or "flags" in IMAP terminology).
+
+=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-overview.pod b/Documentation/lei-overview.pod
index d1903045..33ddb528 100644
--- a/Documentation/lei-overview.pod
+++ b/Documentation/lei-overview.pod
@@ -12,7 +12,15 @@ provides some basic examples.
 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.
+=head2 EXAMPLES
+
+=over
+
+=item $ lei import --format=mboxrd t.mbox
+
+Import the messages from an mbox into the local storage.
+
+=back
 
 =head1 EXTERNALS
 
diff --git a/Documentation/lei.pod b/Documentation/lei.pod
index e12a157d..9ce9e9a4 100644
--- a/Documentation/lei.pod
+++ b/Documentation/lei.pod
@@ -27,9 +27,9 @@ Subcommands for initializing and managing local, writable storage:
 
 =item * L<lei-init(1)>
 
-=back
+=item * L<lei-import(1)>
 
-TODO: Add commands like lei-import once they're implemented.
+=back
 
 The following subcommands can be used to manage and inspect external
 locations:
diff --git a/Documentation/txt2pre b/Documentation/txt2pre
index 604490ef..8421cad7 100755
--- a/Documentation/txt2pre
+++ b/Documentation/txt2pre
@@ -16,6 +16,7 @@ for (qw[lei(1)
 	lei-daemon-kill(1)
 	lei-daemon-pid(1)
 	lei-forget-external(1)
+	lei-import(1)
 	lei-init(1)
 	lei-ls-external(1)
 	lei-overview(7)
diff --git a/MANIFEST b/MANIFEST
index 92226d5a..1794d930 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -26,6 +26,7 @@ Documentation/lei-config.pod
 Documentation/lei-daemon-kill.pod
 Documentation/lei-daemon-pid.pod
 Documentation/lei-forget-external.pod
+Documentation/lei-import.pod
 Documentation/lei-init.pod
 Documentation/lei-ls-external.pod
 Documentation/lei-overview.pod
diff --git a/Makefile.PL b/Makefile.PL
index 6fb0d560..89f1774e 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -45,7 +45,7 @@ $v->{-m1} = [ map {
 	} @EXE_FILES,
 	qw(
 	lei-add-external lei-config lei-daemon-kill lei-daemon-pid
-	lei-forget-external lei-init lei-ls-external lei-q)];
+	lei-forget-external lei-import 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(lei-overview public-inbox-overview public-inbox-tuning) ];
-- 
2.30.0


  parent reply	other threads:[~2021-02-11  4:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-11  4:04 [PATCH 0/4] doc: lei manpages, round 2 Kyle Meyer
2021-02-11  4:04 ` [PATCH 1/4] doc: lei q: use 'mfolder' as --output placeholder Kyle Meyer
2021-02-11  4:04 ` [PATCH 2/4] doc: lei: prefer 'location' and 'dirname' Kyle Meyer
2021-02-11  4:04 ` Kyle Meyer [this message]
2021-02-11  4:04 ` [PATCH 4/4] doc: lei: update manpages Kyle Meyer
2021-02-11  5:08 ` [PATCH 0/4] doc: lei manpages, round 2 Eric Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://public-inbox.org/README

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210211040415.28557-4-kyle@kyleam.com \
    --to=kyle@kyleam.com \
    --cc=meta@public-inbox.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/public-inbox.git

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).