Jonathan Druart
238fabc4ab
The purpose of this script was to load the relevant Koha lib for the different scripts (installation, cronjob, CLI, etc.) However it is not used consistently and we prefer to rely on PERL5LIB. From bug 28617 comment 6 from Galen: """ Time marches on, and one of the motivations for having kohalib.pl - making it possible to install Koha without setting a single environment variable - has been obviated by the vast improvements in the ease of installing Koha. Consequently, I think kohalib.pl can go away. """ Test plan: confirm that the changes make sense and that kohalib.pl can be removed safely. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
23 lines
624 B
Perl
Executable file
23 lines
624 B
Perl
Executable file
#!/usr/bin/perl
|
|
## This script allows you to export a rel_2_2 bibliographic db in
|
|
#MARC21 format from the command line.
|
|
#
|
|
|
|
use strict;
|
|
#use warnings; FIXME - Bug 2505
|
|
|
|
use Koha::Script;
|
|
use C4::Context;
|
|
use C4::Auth;
|
|
my $outfile = $ARGV[0];
|
|
open(my $fh, '>', $outfile) or die $!;
|
|
my $dbh=C4::Context->dbh;
|
|
#$dbh->do("set character_set_client='latin5'");
|
|
$dbh->do("set character_set_connection='utf8'");
|
|
#$dbh->do("set character_set_results='latin5'");
|
|
my $sth=$dbh->prepare("select marc from auth_header order by authid");
|
|
$sth->execute();
|
|
while (my ($marc) = $sth->fetchrow) {
|
|
print $fh $marc;
|
|
}
|
|
close($fh);
|