diff options
author | Eric Wong <e@80x24.org> | 2021-06-12 00:10:42 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-06-13 17:39:36 +0000 |
commit | 05cffd40bf094355d19e12aac9a363e796da1702 (patch) | |
tree | ee5f055ff9b7080be03a1ad7e3043c15b34e6f2f /lib/PublicInbox/LEI.pm | |
parent | be7da7fd80d9373728476a582d0eec9820a4d424 (diff) | |
download | public-inbox-05cffd40bf094355d19e12aac9a363e796da1702.tar.gz |
We'll be able to use this for shell completion for lei import, lcat, tag, etc.. This also adds --url support for scripting purposes.
Diffstat (limited to 'lib/PublicInbox/LEI.pm')
-rw-r--r-- | lib/PublicInbox/LEI.pm | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/PublicInbox/LEI.pm b/lib/PublicInbox/LEI.pm index 122045ee..50a7fdad 100644 --- a/lib/PublicInbox/LEI.pm +++ b/lib/PublicInbox/LEI.pm @@ -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 ], @@ -384,6 +390,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)' ], |