user/dev discussion of public-inbox itself
 help / color / Atom feed
* [PATCH 0/2] import_vger_from_mbox improvements
@ 2020-02-24  0:17 Eric Wong
  2020-02-24  0:17 ` [PATCH 1/2] import_vger_from_mbox: drop redundant "use" statements Eric Wong
  2020-02-24  0:17 ` [PATCH 2/2] import_vger_from_mbox: add --filter parameter Eric Wong
  0 siblings, 2 replies; 3+ messages in thread
From: Eric Wong @ 2020-02-24  0:17 UTC (permalink / raw)
  To: meta

There are lots of mboxes out there :)

Eric Wong (2):
  import_vger_from_mbox: drop redundant "use" statements
  import_vger_from_mbox: add --filter parameter

 scripts/import_vger_from_mbox | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/2] import_vger_from_mbox: drop redundant "use" statements
  2020-02-24  0:17 [PATCH 0/2] import_vger_from_mbox improvements Eric Wong
@ 2020-02-24  0:17 ` Eric Wong
  2020-02-24  0:17 ` [PATCH 2/2] import_vger_from_mbox: add --filter parameter Eric Wong
  1 sibling, 0 replies; 3+ messages in thread
From: Eric Wong @ 2020-02-24  0:17 UTC (permalink / raw)
  To: meta

PublicInbox::InboxWritable takes care of those imports.
---
 scripts/import_vger_from_mbox | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/scripts/import_vger_from_mbox b/scripts/import_vger_from_mbox
index 0e5ba6b4..b3aceb6b 100644
--- a/scripts/import_vger_from_mbox
+++ b/scripts/import_vger_from_mbox
@@ -4,10 +4,7 @@
 use strict;
 use warnings;
 use Getopt::Long qw/:config gnu_getopt no_ignore_case auto_abbrev/;
-use PublicInbox::MIME;
 use PublicInbox::InboxWritable;
-use PublicInbox::Import;
-use PublicInbox::MDA;
 my $usage = "usage: $0 NAME EMAIL DIR <MBOX\n";
 my $dry_run;
 my $version = 2;

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 2/2] import_vger_from_mbox: add --filter parameter
  2020-02-24  0:17 [PATCH 0/2] import_vger_from_mbox improvements Eric Wong
  2020-02-24  0:17 ` [PATCH 1/2] import_vger_from_mbox: drop redundant "use" statements Eric Wong
@ 2020-02-24  0:17 ` Eric Wong
  1 sibling, 0 replies; 3+ messages in thread
From: Eric Wong @ 2020-02-24  0:17 UTC (permalink / raw)
  To: meta

It shouldn't be hard to make this into a more generic
importer not specific to vger lists.
---
 scripts/import_vger_from_mbox | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/scripts/import_vger_from_mbox b/scripts/import_vger_from_mbox
index b3aceb6b..d1ce7231 100644
--- a/scripts/import_vger_from_mbox
+++ b/scripts/import_vger_from_mbox
@@ -9,10 +9,12 @@ my $usage = "usage: $0 NAME EMAIL DIR <MBOX\n";
 my $dry_run;
 my $version = 2;
 my $variant = 'mboxrd';
+my $filter = 'PublicInbox::Filter::Vger';
 my %opts = (
 	'n|dry-run' => \$dry_run,
 	'V|version=i' => \$version,
 	'F|format=s' => \$variant,
+	'filter=s' => \$filter,
 );
 GetOptions(%opts) or die $usage;
 if ($variant ne 'mboxrd' && $variant ne 'mboxo') {
@@ -26,7 +28,7 @@ my $ibx = {
 	name => $name,
 	version => $version,
 	address => [ $email ],
-	filter => 'PublicInbox::Filter::Vger',
+	filter => $filter,
 };
 $ibx = PublicInbox::Inbox->new($ibx);
 unless ($dry_run) {

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-24  0:17 [PATCH 0/2] import_vger_from_mbox improvements Eric Wong
2020-02-24  0:17 ` [PATCH 1/2] import_vger_from_mbox: drop redundant "use" statements Eric Wong
2020-02-24  0:17 ` [PATCH 2/2] import_vger_from_mbox: add --filter parameter Eric Wong

user/dev discussion of public-inbox itself

Archives are clonable:
	git clone --mirror https://public-inbox.org/meta
	git clone --mirror http://czquwvybam4bgbro.onion/meta
	git clone --mirror http://hjrcffqmbrq6wope.onion/meta
	git clone --mirror http://ou63pmih66umazou.onion/meta

Example config snippet for mirrors

Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.mail.public-inbox.meta
	nntp://ou63pmih66umazou.onion/inbox.comp.mail.public-inbox.meta
	nntp://czquwvybam4bgbro.onion/inbox.comp.mail.public-inbox.meta
	nntp://hjrcffqmbrq6wope.onion/inbox.comp.mail.public-inbox.meta
	nntp://news.gmane.io/gmane.mail.public-inbox.general

 note: .onion URLs require Tor: https://www.torproject.org/

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git