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