From c49057880f054834904cb39b32a037eadc0860fe Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Fri, 14 Dec 2012 07:31:00 -0500 Subject: [PATCH] Bug 9286 - Add script to add a bib to the zebra queue from the command line --- misc/mod_zebraqueue.pl | 53 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 53 insertions(+), 0 deletions(-) create mode 100755 misc/mod_zebraqueue.pl diff --git a/misc/mod_zebraqueue.pl b/misc/mod_zebraqueue.pl new file mode 100755 index 0000000..535ce8e --- /dev/null +++ b/misc/mod_zebraqueue.pl @@ -0,0 +1,53 @@ +#!/usr/bin/perl + +# script to add records to the zebraqueue from the commandline. +# (C) 2012 Kyle Hall + +use Getopt::Long; +use Pod::Usage; + +use C4::Biblio; + +## get command line options +my ( $biblionumber ) = get_options(); + +ModZebra( $biblionumber, "specialUpdate", "biblioserver" ); + +sub get_options { + my $biblionumber = ''; + my $help = ''; + + GetOptions( + "b|biblio|biblionumber=s" => \$biblionumber, + 'h|?|help' => \$help, + ); + + pod2usage( -exitval => 0 ) if ( $help || !$biblionumber ); + + return ( $biblionumber ); +} +__END__ + +=head1 NAME + +mod_zebraqueue.pl - Mark bibliographic records for updating via the zebraqueue. + +=head1 SYNOPSIS + +mod_zebraqueue.pl -b $biblionumber + +=head1 OPTIONS + +=over 8 + +=item B<-b, --biblio, --biblionumber> + +The biblionumber of the record to be updated. + +=item B<-h, -?, --help> + +Prints this help message and exits. + +=back + +=cut -- 1.7.2.5