From 4b3ee55d1dd067072646c16dd3856c96588991bc Mon Sep 17 00:00:00 2001 From: Felix Lohmeier Date: Mon, 1 Mar 2021 00:50:33 +0100 Subject: [PATCH] 2010 ISSN --- bibliotheca/Taskfile.yml | 2 ++ bibliotheca/config/main/2010.json | 34 ++++++++++++++++++++++++++++ bibliotheca/config/main/template.txt | 1 + pica+/config/template.txt | 1 + 4 files changed, 38 insertions(+) create mode 100644 bibliotheca/config/main/2010.json diff --git a/bibliotheca/Taskfile.yml b/bibliotheca/Taskfile.yml index 693075a..842dc04 100644 --- a/bibliotheca/Taskfile.yml +++ b/bibliotheca/Taskfile.yml @@ -128,6 +128,8 @@ tasks: "$CLIENT" -P {{.PORT}} {{.PROJECT}} --apply config/main/2000.json > {{.LOG}} - > # spec_B_T_04, spec_B_T_05: ISMN 2020 "$CLIENT" -P {{.PORT}} {{.PROJECT}} --apply config/main/2020.json > {{.LOG}} + - > # spec_B_T_29: ISSN 2010 + "$CLIENT" -P {{.PORT}} {{.PROJECT}} --apply config/main/2010.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/2010.json b/bibliotheca/config/main/2010.json new file mode 100644 index 0000000..9ca8fb3 --- /dev/null +++ b/bibliotheca/config/main/2010.json @@ -0,0 +1,34 @@ +[ + { + "op": "core/column-addition", + "engineConfig": { + "facets": [ + { + "type": "list", + "name": "M|ISSN", + "expression": "isBlank(value)", + "columnName": "M|ISSN", + "invert": false, + "omitBlank": false, + "omitError": false, + "selection": [ + { + "v": { + "v": false, + "l": "false" + } + } + ], + "selectBlank": false, + "selectError": false + } + ], + "mode": "row-based" + }, + "baseColumnName": "M|ISSN", + "expression": "grel:value.replace('-','')", + "onError": "set-to-blank", + "newColumnName": "2010", + "columnInsertIndex": 3, + } +] diff --git a/bibliotheca/config/main/template.txt b/bibliotheca/config/main/template.txt index 2aba7b7..5dd1c47 100644 --- a/bibliotheca/config/main/template.txt +++ b/bibliotheca/config/main/template.txt @@ -19,6 +19,7 @@ with( '1140', '1500', '2000', + '2010', '2020', '4000a', '4000d', diff --git a/pica+/config/template.txt b/pica+/config/template.txt index b9d1388..6c82cd5 100644 --- a/pica+/config/template.txt +++ b/pica+/config/template.txt @@ -8,6 +8,7 @@ if(row.index - row.record.fromRowIndex == 0, + forNonBlank(cells['0100'].value, v, '003@ ' + '0' + v + '\n', '') + forNonBlank(cells['0110'].value, v, '003S ' + '0' + v + '\n', '') + forNonBlank(cells['2000'].value, v, forEach(v.split('␟'),x,'004A ' + '0' + x + '\n').join(''), '') ++ forNonBlank(cells['2010'].value, v, '005A ' + '0' + v + '\n', '') + forNonBlank(cells['2020'].value, v, '004F ' + '0' + v + '\n', '') + forNonBlank(cells['2199'].value, v, forEach(v.split('␟'),x,'006Y ' + '0' + x + '\n').join(''), '') + forNonBlank(cells['1500'].value, v, '010@ ' + forEach(v.split('␟'),x,'a' + x).join('') + '\n', '')