[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] koha/export export-holdings.pl [rel_2_2]
From: |
Mason James |
Subject: |
[Koha-cvs] koha/export export-holdings.pl [rel_2_2] |
Date: |
Mon, 15 Jan 2007 21:09:55 +0000 |
CVSROOT: /sources/koha
Module name: koha
Branch: rel_2_2
Changes by: Mason James <sushi> 07/01/15 21:09:54
Added files:
export : export-holdings.pl
Log message:
script to export/dump items to file in XML or CSV format.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/export/export-holdings.pl?cvsroot=koha&only_with_tag=rel_2_2&rev=1.1.2.1
Patches:
Index: export-holdings.pl
===================================================================
RCS file: export-holdings.pl
diff -N export-holdings.pl
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ export-holdings.pl 15 Jan 2007 21:09:54 -0000 1.1.2.1
@@ -0,0 +1,39 @@
+#!/usr/bin/perl
+use strict;
+use HTML::Template;
+require Exporter;
+use C4::Auth;
+use C4::Interface::CGI::Output;
+use C4::Output; # contains gettemplate
+use C4::Biblio;
+use CGI;
+use C4::Export;
+
+my $query = new CGI;
+my $format = $query->param("op");
+my $start_date = $query->param("from");
+my $end_date = $query->param("to");
+
+my $start_date = '2006-08-30';
+my $end_date = '2006-08-31';
+my $filename = "export.$format";
+
+if ($format) {
+
+ export_bibs_by_date_to_file( $start_date, $end_date, $format, $filename );
+}
+else {
+ my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
+ {
+ template_name => "export/export-holdings.tmpl",
+ query => $query,
+ type => "intranet",
+ authnotrequired => 0,
+ flagsrequired => { parameters => 1, management => 1, tools => 1 }
+ , #NOT NEEDED??
+ debug => 1,
+ }
+ );
+ output_html_with_http_headers $query, $cookie, $template->output;
+}
+
- [Koha-cvs] koha/export export-holdings.pl [rel_2_2],
Mason James <=