bug_6624: Added Open Library Search and Read API calls to opac-results.tt and opac...
[srvgit] / misc / export_records.pl
index cbb4bb0..e6c3d98 100755 (executable)
@@ -67,6 +67,10 @@ $record_type ||= 'bibs';
 # Retrocompatibility for the format parameter
 $output_format = 'iso2709' if $output_format eq 'marc';
 
+if ( $output_format eq 'csv' and $record_type eq 'auths' ) {
+    pod2usage(q|CSV output is only available for biblio records|);
+}
+
 
 if ( $timestamp and $record_type ne 'bibs' ) {
     pod2usage(q|--timestamp can only be used with biblios|);
@@ -163,7 +167,7 @@ elsif ( $record_type eq 'auths' ) {
             : (),
         ( $authtype ? ( authtypecode => $authtype ) : () ),
     };
-    # Koha::Authority is not a Koha::Object...
+    # Koha::MetadataRecord::Authority is not a Koha::Object...
     my $authorities = Koha::Database->new->schema->resultset('AuthHeader')->search( $conditions );
     @record_ids = map { $_->authid } $authorities->all;
 }
@@ -221,7 +225,7 @@ Print a brief help message.
 
 =item B<--format>
 
- --format=FORMAT        FORMAT is either 'xml', 'csv'  or 'marc' (default).
+ --format=FORMAT        FORMAT is either 'xml', 'csv' (biblio records only) or 'marc' (default).
 
 =item B<--date>
 
@@ -242,6 +246,7 @@ Print a brief help message.
 
  --csv_profile_id=ID    Generate a CSV file with the given CSV profile id (see tools/csv-profiles.pl)
                         Unless provided, the one defined in the system preference 'ExportWithCsvProfile' will be used.
+                        This can only be used to export biblio records.
 
 =item B<--deleted_barcodes>
 
@@ -266,24 +271,44 @@ Print a brief help message.
 
 =item B<--starting_authid>
 
+ --starting_authid=ID  Export authorities with authid >= ID
+
 =item B<--ending_authid>
 
+ --ending_authid=ID    Export authorities with authid <= ID
+
 =item B<--authtype>
 
+ --authtype=AUTHTYPE   Export authorities from the given AUTHTYPE
+
 =item B<--starting_biblionumber>
 
+ --starting_biblionumber=ID  Export biblio with biblionumber >= ID
+
 =item B<--ending_biblionumber>
 
+ --ending_biblionumber=ID    Export biblio with biblionumber <= ID
+
 =item B<--itemtype>
 
+ --itemtype=ITEMTYPE         Export biblio from the given ITEMTYPE
+
 =item B<--starting_callnumber>
 
+ --starting_callnumber=CALLNUMBER Export biblio with callnumber >=CALLNUMBER
+
 =item B<--ending_callnumber>
 
+ --ending_callnumber=CALLNUMBER Export biblio with callnumber <=CALLNUMBER
+
 =item B<--start_accession>
 
+ --starting_accession=DATE      Export biblio with an item accessionned after DATE
+
 =item B<--end_accession>
 
+ --end_accession=DATE           Export biblio with an item accessionned after DATE
+
 =back
 
 =head1 AUTHOR