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-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 5778B1FA01 for ; Wed, 10 Feb 2021 07:07:50 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 5/6] lei: note some TODO items (curl, externals) Date: Wed, 10 Feb 2021 07:07:48 +0000 Message-Id: <20210210070749.30391-6-e@80x24.org> In-Reply-To: <20210210070749.30391-1-e@80x24.org> References: <20210210070749.30391-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: I don't know if it's worth it to use libcurl directly (nor the effort to support and maintain tests) --- lib/PublicInbox/LeiCurl.pm | 2 ++ lib/PublicInbox/LeiExternal.pm | 3 +++ 2 files changed, 5 insertions(+) diff --git a/lib/PublicInbox/LeiCurl.pm b/lib/PublicInbox/LeiCurl.pm index f346a1b4..3a79fbf8 100644 --- a/lib/PublicInbox/LeiCurl.pm +++ b/lib/PublicInbox/LeiCurl.pm @@ -2,6 +2,8 @@ # License: AGPL-3.0+ # common option and torsocks(1) wrapping for curl(1) +# Eventually, we may support using libcurl via Inline::C and/or +# WWW::Curl; but curl(1) is most prevalent and widely-installed. package PublicInbox::LeiCurl; use strict; use v5.10.1; diff --git a/lib/PublicInbox/LeiExternal.pm b/lib/PublicInbox/LeiExternal.pm index b402eed4..8a51afcb 100644 --- a/lib/PublicInbox/LeiExternal.pm +++ b/lib/PublicInbox/LeiExternal.pm @@ -44,6 +44,8 @@ sub ext_canonicalize { } } +# TODO: we will probably extract glob2re into a separate module for +# PublicInbox::Filter::Base and maybe other places my %re_map = ( '*' => '[^/]*?', '?' => '[^/]', '[' => '[', ']' => ']', ',' => ',' ); @@ -99,6 +101,7 @@ sub get_externals { (); } +# TODO: does this need JSON output? sub lei_ls_external { my ($self, $filter) = @_; my $opt = $self->{opt};