16 pod2usage
(1) if $help or not @ARGV;
18 for my $file ( @ARGV ) {
19 say "Find biblionumber in file $file";
21 open($fh, '<', $file) or say "Error: '$file' $!" and next;
24 my $biblionumber = $_;
25 $biblionumber =~ s/$1/\n/g if $biblionumber =~ m/(\r\n?|\n\r?)/;
27 my $dbh = C4
::Context
->dbh;
28 next if not $biblionumber =~ /^\d*$/;
29 print "Delete biblionumber $biblionumber ";
32 $error = DelBiblio
$biblionumber;
35 say "KO $@ ($! | $error)";
52 ./batchdeletebiblio.pl file1 [file2 ... filen]
54 This script batch deletes biblios which contain a biblionumber present in file passed in parameter.
55 If one biblio has items, it is not deleted.
63 prints this help message
69 Jonathan Druart <jonathan.druart@biblibre.com>
73 Copyright 2012 BibLibre
77 This file is part of Koha.
79 Koha 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
80 Foundation; either version 2 of the License, or (at your option) any later version.
82 You should have received a copy of the GNU General Public License along
83 with Koha; if not, write to the Free Software Foundation, Inc.,
84 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
86 =head1 DISCLAIMER OF WARRANTY
88 Koha is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
89 A PARTICULAR PURPOSE. See the GNU General Public License for more details.