]> Sergey Matveev's repositories - public-inbox.git/blobdiff - scripts/import_vger_from_mbox
nntp: use substr to check for trailing CRLF
[public-inbox.git] / scripts / import_vger_from_mbox
index b3aceb6becca87c4ead65287279cd0298254f32b..c33e42e45c2823e1e87e9a2139fea60efc132468 100644 (file)
@@ -1,5 +1,5 @@
 #!/usr/bin/perl -w
-# Copyright (C) 2016-2020 all contributors <meta@public-inbox.org>
+# Copyright (C) 2016-2021 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 use strict;
 use warnings;
@@ -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) {