From 8f173a89729080bde557a366cd391f82b57620c6 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 | 54 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 54 insertions(+), 0 deletions(-) create mode 100644 misc/mod_zebraqueue.pl diff --git a/misc/mod_zebraqueue.pl b/misc/mod_zebraqueue.pl new file mode 100644 index 0000000..a51497b --- /dev/null +++ b/misc/mod_zebraqueue.pl @@ -0,0 +1,54 @@ +#!/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; + + 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