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 193-203
if ($deleted_barcodes) {
Link Here
|
193 |
} |
196 |
} |
194 |
} |
197 |
} |
195 |
else { |
198 |
else { |
196 |
unless ( $csv_profile_id ) { |
|
|
197 |
# FIXME export_format.profile should be a unique key |
198 |
my $default_csv_profiles = Koha::CsvProfiles->search({ profile => C4::Context->preference('ExportWithCsvProfile') }); |
199 |
$csv_profile_id = $default_csv_profiles->count ? $default_csv_profiles->next->export_format_id : undef; |
200 |
} |
201 |
Koha::Exporter::Record::export( |
199 |
Koha::Exporter::Record::export( |
202 |
{ record_type => $record_type, |
200 |
{ record_type => $record_type, |
203 |
record_ids => \@record_ids, |
201 |
record_ids => \@record_ids, |
Lines 249-255
Print a brief help message.
Link Here
|
249 |
=item B<--csv_profile_id> |
247 |
=item B<--csv_profile_id> |
250 |
|
248 |
|
251 |
--csv_profile_id=ID Generate a CSV file with the given CSV profile id (see tools/csv-profiles.pl) |
249 |
--csv_profile_id=ID Generate a CSV file with the given CSV profile id (see tools/csv-profiles.pl) |
252 |
Unless provided, the one defined in the system preference 'ExportWithCsvProfile' will be used. |
|
|
253 |
This can only be used to export biblio records. |
250 |
This can only be used to export biblio records. |
254 |
|
251 |
|
255 |
=item B<--deleted_barcodes> |
252 |
=item B<--deleted_barcodes> |