Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

executable file 31 lines (28 sloc) 0.787 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
#!/usr/bin/env perl
## This script allows you to export a rel_2_2 bibliographic db in
#MARC21 format from the command line.
#

use strict;
BEGIN {
    # find Koha's Perl modules
    # test carefully before changing this
    use FindBin;
    eval { require "$FindBin::Bin/kohalib.pl" };
}

use Koha;
use C4::Context;
use C4::Output; # contains gettemplate
use C4::Biblio;
use C4::Auth;
my $outfile = $ARGV[0];
open(OUT,">$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 OUT $marc;
 }
close(OUT);
Something went wrong with that request. Please try again.