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 389C21F5AE for ; Tue, 27 Apr 2021 11:07:53 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 0/5] lei lcat - local cat (not lolcat :P) Date: Tue, 27 Apr 2021 11:07:48 +0000 Message-Id: <20210427110753.24609-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: "lei lcat" is a convenience command to extract Message-IDs from URLs and <$MSGID> or "id:$MSGID" args (or stdin) and attempt to display them as text. --format=text is now the default for lcat, and an option for "lei q" for stdout users. It decodes base64 and QP just like the WWW interface. It also supports ANSI terminal colors and loads the diff ones from the users' existing git config. It's actually my first time using Term::ANSIColor, even though it's bundled with Perl since 5.6. I got sidetracked on the sync stuff, but "ls-sync" exists, now. I'm not sure how sync would work, especially since I want to avoid reconnecting for imports... Eric Wong (5): lei: add "ls-sync" command for listing sync folders lei blob: support retrieving attachments via $OID:$IDX lei: standardize on _lei_wq_eof callback for workers lei lcat: extract Message-IDs from URLs and show them lei q + lcat: support --format=text output MANIFEST | 5 + lib/PublicInbox/Hval.pm | 2 +- lib/PublicInbox/LEI.pm | 12 +- lib/PublicInbox/LeiBlob.pm | 37 ++++- lib/PublicInbox/LeiConvert.pm | 2 +- lib/PublicInbox/LeiExternal.pm | 2 +- lib/PublicInbox/LeiImport.pm | 6 +- lib/PublicInbox/LeiLcat.pm | 125 +++++++++++++++++ lib/PublicInbox/LeiLsSync.pm | 29 ++++ lib/PublicInbox/LeiMirror.pm | 6 +- lib/PublicInbox/LeiP2q.pm | 2 +- lib/PublicInbox/LeiTag.pm | 8 +- lib/PublicInbox/LeiToMail.pm | 63 ++++++++- lib/PublicInbox/LeiViewText.pm | 237 +++++++++++++++++++++++++++++++++ lib/PublicInbox/ViewDiff.pm | 4 +- t/lei-import-imap.t | 8 ++ t/lei-import-maildir.t | 3 + t/lei-lcat.t | 16 +++ t/lei_lcat.t | 44 ++++++ 19 files changed, 584 insertions(+), 27 deletions(-) create mode 100644 lib/PublicInbox/LeiLcat.pm create mode 100644 lib/PublicInbox/LeiLsSync.pm create mode 100644 lib/PublicInbox/LeiViewText.pm create mode 100644 t/lei-lcat.t create mode 100644 t/lei_lcat.t