about summary refs log tree commit homepage
path: root/lib/PublicInbox/LeiLsMailSource.pm
DateCommit message (Collapse)
2024-01-11lei+net_reader: show NNTP message in more failures
Showing absolutely nothing when hitting a server requiring authentication is a very bad user experience. While we're at it, use Net::Cmd->message in more places where we experience failure, too.
2023-11-09lei ls-mail-source: gracefully handle network failures
All network connections may fail, so try to emit a helpful error message instead of attempting to dispatch methods off `undef'.
2021-11-02lei: simplify common LeiInput users with ->wq1_start
This method replaces a common pattern of starting workers, preparing internal auth ops, and asynchronous waiting of command completion. It also adds missing LeiAuth support to rediff and rm which rarely need auth.
2021-10-24lei: always pass $lei to LeiAuth->op_merge
This will make future developments easier.
2021-09-27lei completion: workaround old Perl bug
While `$argv[-1]' is `undef' on an empty @argv, using `$argv[-1]' as a subroutine argument would fail incorrectly with: Modification of non-creatable array value attempted, subscript -1 at ... ...even though we'd never attempt to modify @_ itself in the subroutines being called. Work around the bug (tested on 5.16.3) by passing `undef' explicitly when `$argv[-1]' is already `undef'. Reported-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org> Link: https://public-inbox.org/meta/20210927124056.kj5okiefvs4ztk27@meerkat.local/
2021-09-21lei: various completion improvements
"lei export-kw" no longer completes for anonymous sources. More commands use "lei refresh-mail-sync" as a basis for their completion work, as well. ";AUTH=ANONYMOUS@" is stripped from completions since it was preventing bash completion from working on AUTH=ANONYMOUS IMAP URLs. I'm not sure if there's a better way, but all of our code works fine without specifying AUTH=ANONYMOUS as a command-line arg. Finally, we fallback to using more candidates if none can be found, allowing multiple URLs to be completed.
2021-09-19lei ls-mail-source: pretty JSON support
As with other commands, we enable pretty JSON by default if stdout is a terminal or if --pretty is specified. While the ->pretty JSON output has excessive vertical whitespace, too many lines is preferable to having everything on one line.
2021-09-19lei ls-mail-source: use "high"/"low" for NNTP
The meanings of "hwm" and "lwm" may not be obvious abbreviations for (high|low) water mark descriptions used by RFC 3977. "high" and "low" should be obvious to anyone.
2021-09-18lei: lock worker counts
It doesn't seem worthwhile to change worker counts dynamically on a per-command-basis with lei, and I don't know how such an interface would even work...
2021-09-16lei ls-mail-source: sort IMAP folder names
Otherwise, public-inbox-imapd will emit mailboxes in random order (as IMAP servers do not need to guarantee any sort of ordering). We'll take into account numeric slice numbers generated by -imapd if they exist, so slice "80" doesn't show up next to "8".
2021-09-06lei_auth: simplify users
There's no need to alias net_merge_all in each WQ class which uses LeiAuth, `$obj->$sub' works even when `$sub' is a fully-qualified subroutine name with `::' in it. perlobj(1) documents it under "Method Call Variations".
2021-08-18lei: add ->lms shortcut for LeiMailSync
We access this read-only in many places (and will in more), so provide a shortcut to simplify callers.
2021-06-13lei ls-mail-source: write through to URL folder cache
We'll be able to use this for shell completion for lei import, lcat, tag, etc.. This also adds --url support for scripting purposes.
2021-06-12lei ls-mail-source: list IMAP folders and NNTP groups
While other tools can provide the same functionality, having integration with git-credential is convenient, here. Caching and completion will be implemented separately.