From 74c500025a384e91311e7204330571afb24f1f6d Mon Sep 17 00:00:00 2001 From: Felix Lohmeier Date: Mon, 1 Mar 2021 01:02:56 +0100 Subject: [PATCH] 2240 ZDB-Nummer --- bibliotheca/Taskfile.yml | 2 ++ bibliotheca/config/main/2240.json | 34 ++++++++++++++++++++++++++++ bibliotheca/config/main/template.txt | 1 + pica+/config/template.txt | 1 + 4 files changed, 38 insertions(+) create mode 100644 bibliotheca/config/main/2240.json diff --git a/bibliotheca/Taskfile.yml b/bibliotheca/Taskfile.yml index 8fff035..893da4e 100644 --- a/bibliotheca/Taskfile.yml +++ b/bibliotheca/Taskfile.yml @@ -132,6 +132,8 @@ tasks: "$CLIENT" -P {{.PORT}} {{.PROJECT}} --apply config/main/2010.json > {{.LOG}} - > # spec_B_T_06: EAN 2201 "$CLIENT" -P {{.PORT}} {{.PROJECT}} --apply config/main/2201.json > {{.LOG}} + - > # spec_B_T_55: ZDB-ID 2240 + "$CLIENT" -P {{.PORT}} {{.PROJECT}} --apply config/main/2240.json > {{.LOG}} - > # spec_B_E_10: Zugangsdatum E0XX "$CLIENT" -P {{.PORT}} {{.PROJECT}} --apply config/main/e0xx.json > {{.LOG}} - > # spec_B_E_14, spec_Z_03, spec_B_E16: Selektionsschlüssel E0XXb diff --git a/bibliotheca/config/main/2240.json b/bibliotheca/config/main/2240.json new file mode 100644 index 0000000..46b4b8b --- /dev/null +++ b/bibliotheca/config/main/2240.json @@ -0,0 +1,34 @@ +[ + { + "op": "core/column-addition", + "engineConfig": { + "facets": [ + { + "type": "list", + "name": "M|026", + "expression": "grel:value[0,3]", + "columnName": "M|026", + "invert": false, + "omitBlank": false, + "omitError": false, + "selection": [ + { + "v": { + "v": "ZDB", + "l": "ZDB" + } + } + ], + "selectBlank": false, + "selectError": false + } + ], + "mode": "row-based" + }, + "baseColumnName": "M|026", + "expression": "grel:value.slice(3)", + "onError": "set-to-blank", + "newColumnName": "2240", + "columnInsertIndex": 3, + } +] diff --git a/bibliotheca/config/main/template.txt b/bibliotheca/config/main/template.txt index 12116bf..8ea674e 100644 --- a/bibliotheca/config/main/template.txt +++ b/bibliotheca/config/main/template.txt @@ -22,6 +22,7 @@ with( '2010', '2020', '2201', + '2240', '4000a', '4000d', '4020a', diff --git a/pica+/config/template.txt b/pica+/config/template.txt index a2a3177..4a6f8d6 100644 --- a/pica+/config/template.txt +++ b/pica+/config/template.txt @@ -12,6 +12,7 @@ if(row.index - row.record.fromRowIndex == 0, + forNonBlank(cells['2020'].value, v, '004F ' + '0' + v + '\n', '') + forNonBlank(cells['2201'].value, v, '004L ' + '0' + v + '\n', '') + forNonBlank(cells['2199'].value, v, forEach(v.split('␟'),x,'006Y ' + '0' + x + '\n').join(''), '') ++ forNonBlank(cells['2240'].value, v, '007G ' + 'iZDB' + '0' + v + '\n', '') + forNonBlank(cells['1500'].value, v, '010@ ' + forEach(v.split('␟'),x,'a' + x).join('') + '\n', '') + forNonBlank(cells['1100a'].value, v, '011@ ' + 'a' + v + forNonBlank(cells['1100b'].value, v, 'b' + v, '') + forNonBlank(cells['1100n'].value, v, 'n' + v, '') + '\n', '') + forNonBlank(cells['1131'].value, v, '013D ' + 'a' + v + '\n', '')