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
80 under the terms of the GNU General Public License as published by
81 the Free Software Foundation; either version 3 of the License, or
82 (at your option) any later version.
84 Koha is distributed in the hope that it will be useful, but
85 WITHOUT ANY WARRANTY; without even the implied warranty of
86 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
87 GNU General Public License for more details.
89 You should have received a copy of the GNU General Public License
90 along with Koha; if not, see <http://www.gnu.org/licenses>.
92 =head1 DISCLAIMER OF WARRANTY
94 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
95 A PARTICULAR PURPOSE. See the GNU General Public License for more details.