[Koha-cvs] koha/misc exportmarcconsole.pl [dev_week]
Tumer Garip
tgarip at neu.edu.tr
Tue May 9 11:18:02 CEST 2006
CVSROOT: /sources/koha
Module name: koha
Branch: dev_week
Changes by: Tumer Garip <tgarip1957 at savannah.gnu.org> 06/05/09 09:18:02
Added files:
misc : exportmarcconsole.pl
Log message:
Export marc fom console
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/koha/misc/exportmarcconsole.pl?only_with_tag=dev_week&rev=1.1.2.1
Patches:
Index: koha/misc/exportmarcconsole.pl
diff -u /dev/null koha/misc/exportmarcconsole.pl:1.1.2.1
--- /dev/null Tue May 9 09:18:02 2006
+++ koha/misc/exportmarcconsole.pl Tue May 9 09:18:02 2006
@@ -0,0 +1,28 @@
+#!/usr/bin/perl
+## This script allows you to export a rel_2_2 bibliographic db in
+#MARC21 format from the command line.
+#
+use HTML::Template;
+use strict;
+require Exporter;
+use C4::Database;
+use C4::Auth;
+use C4::Interface::CGI::Output;
+use C4::Output; # contains gettemplate
+use C4::AuthoritiesMarc;
+use CGI;
+use C4::Auth;
+use MARC::Record;
+my $outfile = $ARGV[0];
+open(OUT,">$outfile") or die $!;
+my $query = new CGI;
+my $dbh=C4::Context->dbh;
+
+
+
+ my $sth=$dbh->prepare("select marc from biblioitems order by biblionumber");
+ $sth->execute();
+ while (my ($marc) = $sth->fetchrow) {
+ print OUT $marc;
+ }
+close(OUT);
More information about the Koha-cvs
mailing list