#!/usr/bin/perl
+
+# Copyright 2009-2012, Equinox Software, Inc.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
use strict;
use warnings;
use open ':utf8';
chomp;
my ($lead,$sub) = split /\t/;
$sub =~ s/\s//g; # any whitespace is extraneous
- $exclude{$sub} = 1 unless ($sub < $conf->{lowerbound});
+ if ($conf->{reverse}) {
+ $exclude{$lead} = 1 unless ($lead < $conf->{lowerbound});
+ } else {
+ $exclude{$sub} = 1 unless ($sub < $conf->{lowerbound});
+ }
}
close FP;
'output|o=s',
'tag|t=i',
'subfield|s=s',
+ 'reverse|r',
'help|h',
);
show_help() unless $rc;
--output -o MARCXML output file
--tag -t MARC tag to use as identifier (default: 903)
--subfield -s Subfield of --tag argument (default: 'a')
+ --reverse -r Output subordinate bibs rather than lead bibs
HELP
exit;
}