]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/LEI.pm
lei import: help + completion for --new-only
[public-inbox.git] / lib / PublicInbox / LEI.pm
index 122045eeef905d0cd38b29a81d8f8bb154ce352f..546fa773fc4c334cc83a27358ba74f016cf62dab 100644 (file)
@@ -116,6 +116,12 @@ sub cache_dir ($) {
                .'/lei');
 }
 
+sub url_folder_cache {
+       my ($self) = @_;
+       require PublicInbox::SharedKV; # URI => updated_at_sec_
+       PublicInbox::SharedKV->new(cache_dir($self).'/uri_folder');
+}
+
 sub ale {
        my ($self) = @_;
        $self->{ale} //= do {
@@ -197,7 +203,7 @@ our %CMD = ( # sorted in order of importance/use:
 'ls-mail-sync' => [ '[FILTER]', 'list mail sync folders',
                qw(z|0 globoff|g invert-match|v local remote), @c_opt ],
 'ls-mail-source' => [ 'URL', 'list IMAP or NNTP mail source folders',
-               qw(z|0 ascii l), @c_opt ],
+               qw(z|0 ascii l url), @c_opt ],
 'forget-external' => [ 'LOCATION...|--prune',
        'exclude further results from a publicinbox|extindex',
        qw(prune), @c_opt ],
@@ -347,6 +353,7 @@ my %OPTDESC = (
        "or\xa0`-'\x{a0}for\x{a0}stdout)" ],
 'mua=s' => [ 'CMD',
        "MUA to run on --output Maildir or mbox (e.g.\xa0`mutt\xa0-f\xa0%f')" ],
+'new-only      import' => 'only import new messages from IMAP source',
 
 'inbox-version=i' => [ 'NUM|1|2',
                'force a public-inbox version with --mirror'],
@@ -384,6 +391,7 @@ my %OPTDESC = (
                        'listing output format' ],
 'l     ls-search' => 'long listing format',
 'l     ls-mail-source' => 'long listing format',
+'url   ls-mail-source' => 'show full URL of newsgroup or IMAP folder',
 'format|f=s    ls-external' => $ls_format,
 
 'limit|n=i@' => ['NUM', 'limit on number of matches (default: 10000)' ],