Lines 71-76
if ( $output_format eq 'csv' and $record_type eq 'auths' ) {
Link Here
|
71 |
pod2usage(q|CSV output is only available for biblio records|); |
71 |
pod2usage(q|CSV output is only available for biblio records|); |
72 |
} |
72 |
} |
73 |
|
73 |
|
|
|
74 |
if ( $output_format eq 'csv' and not $csv_profile_id ) { |
75 |
pod2usage(q|Define a csv profile to export in CSV|); |
76 |
} |
74 |
|
77 |
|
75 |
if ( $timestamp and $record_type ne 'bibs' ) { |
78 |
if ( $timestamp and $record_type ne 'bibs' ) { |
76 |
pod2usage(q|--timestamp can only be used with biblios|); |
79 |
pod2usage(q|--timestamp can only be used with biblios|); |
Lines 195-205
if ($deleted_barcodes) {
Link Here
|
195 |
} |
198 |
} |
196 |
} |
199 |
} |
197 |
else { |
200 |
else { |
198 |
unless ( $csv_profile_id ) { |
|
|
199 |
# FIXME export_format.profile should be a unique key |
200 |
my $default_csv_profiles = Koha::CsvProfiles->search({ profile => C4::Context->preference('ExportWithCsvProfile') }); |
201 |
$csv_profile_id = $default_csv_profiles->count ? $default_csv_profiles->next->export_format_id : undef; |
202 |
} |
203 |
Koha::Exporter::Record::export( |
201 |
Koha::Exporter::Record::export( |
204 |
{ record_type => $record_type, |
202 |
{ record_type => $record_type, |
205 |
record_ids => \@record_ids, |
203 |
record_ids => \@record_ids, |
Lines 251-257
Print a brief help message.
Link Here
|
251 |
=item B<--csv_profile_id> |
249 |
=item B<--csv_profile_id> |
252 |
|
250 |
|
253 |
--csv_profile_id=ID Generate a CSV file with the given CSV profile id (see tools/csv-profiles.pl) |
251 |
--csv_profile_id=ID Generate a CSV file with the given CSV profile id (see tools/csv-profiles.pl) |
254 |
Unless provided, the one defined in the system preference 'ExportWithCsvProfile' will be used. |
|
|
255 |
This can only be used to export biblio records. |
252 |
This can only be used to export biblio records. |
256 |
|
253 |
|
257 |
=item B<--deleted_barcodes> |
254 |
=item B<--deleted_barcodes> |