0268a58e16
Adds the ability to customize CSV exports through the use of a YAML file.
The following customizations are available :
- Preprocessing
- Postprocessing
- Field-by-field processing
The YAML field should be stored in the tools/csv-profiles/ directory and
named after the id of the CSV profile you want to customize.
An example file is provided in that directory.
(cherry picked from commit 76655b5b94
)
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
15 lines
394 B
YAML
15 lines
394 B
YAML
# CSV Export custom processing example
|
|
# (should be name according to the csv export id : 1.yaml for example)
|
|
--- |
|
|
# preprocessing
|
|
# Deactivate quoting
|
|
$csv->quote_char('');
|
|
--- |
|
|
# postprocessing
|
|
# Adding a trailer at the end of the CSV file
|
|
$output .= "This is a trailer";
|
|
--- |
|
|
# field processing
|
|
# Adding "Word " before each 001
|
|
if ($marcfield eq '001') { $value = 'Word ' . $value; }
|
|
---
|