From 98aa532df57b8523ee3e44acc97876e20e01a4ba Mon Sep 17 00:00:00 2001 From: Felix Lohmeier Date: Thu, 4 Mar 2021 17:16:13 +0100 Subject: [PATCH] Einheitssachtitel 2310, lokale Systematik 67XX --- bibliotheca/Taskfile.yml | 4 ++ bibliotheca/config/main/3210.json | 14 ++++++ bibliotheca/config/main/67XX.json | 66 ++++++++++++++++++++++++++++ bibliotheca/config/main/template.txt | 2 + pica+/config/template.txt | 2 + 5 files changed, 88 insertions(+) create mode 100644 bibliotheca/config/main/3210.json create mode 100644 bibliotheca/config/main/67XX.json diff --git a/bibliotheca/Taskfile.yml b/bibliotheca/Taskfile.yml index ee0cb0b..c0689b4 100644 --- a/bibliotheca/Taskfile.yml +++ b/bibliotheca/Taskfile.yml @@ -192,6 +192,10 @@ tasks: "$CLIENT" -P {{.PORT}} {{.PROJECT}} --apply config/main/8600.json > {{.LOG}} - > # spec_B_T_24: Hochschulschriftenvermerk für Abschlussarbeiten 4204 "$CLIENT" -P {{.PORT}} {{.PROJECT}} --apply config/main/4204.json > {{.LOG}} + - > # spec_B_T_25: Einheitssachtitel 3210 + "$CLIENT" -P {{.PORT}} {{.PROJECT}} --apply config/main/3210.json > {{.LOG}} + - > # spec_B_T_48: Lokale Systematik in 67XX (Exemplarsatz!) für BB, BZ, GC + "$CLIENT" -P {{.PORT}} {{.PROJECT}} --apply config/main/67XX.json > {{.LOG}} # Die folgende Transformationsregel muss direkt vor dem Export stehen - > # Abschließend Titel ohne Exemplare löschen; Mehrteilige Monografien sollen stehen bleiben, daher nur: wenn BANDB und BANDN nicht leer "$CLIENT" -P {{.PORT}} {{.PROJECT}} --apply config/main/abschluss.json > {{.LOG}} diff --git a/bibliotheca/config/main/3210.json b/bibliotheca/config/main/3210.json new file mode 100644 index 0000000..c159113 --- /dev/null +++ b/bibliotheca/config/main/3210.json @@ -0,0 +1,14 @@ +[ + { + "op": "core/column-addition", + "engineConfig": { + "facets": [], + "mode": "row-based" + }, + "baseColumnName": "M|EST", + "expression": "grel:value", + "onError": "set-to-blank", + "newColumnName": "3210", + "columnInsertIndex": 3 + } +] diff --git a/bibliotheca/config/main/67XX.json b/bibliotheca/config/main/67XX.json new file mode 100644 index 0000000..e219338 --- /dev/null +++ b/bibliotheca/config/main/67XX.json @@ -0,0 +1,66 @@ +[ + { + "op": "core/column-addition", + "engineConfig": { + "facets": [ + { + "type": "list", + "name": "File", + "expression": "value", + "columnName": "File", + "invert": false, + "omitBlank": false, + "omitError": false, + "selection": [ + { + "v": { + "v": "BB", + "l": "BB" + } + }, + { + "v": { + "v": "BZ", + "l": "BZ" + } + }, + { + "v": { + "v": "GC", + "l": "GC" + } + } + ], + "selectBlank": false, + "selectError": false + }, + { + "type": "list", + "name": "M|SYST", + "expression": "isBlank(value)", + "columnName": "M|SYST", + "invert": false, + "omitBlank": false, + "omitError": false, + "selection": [ + { + "v": { + "v": false, + "l": "false" + } + } + ], + "selectBlank": false, + "selectError": false + } + ], + "mode": "record-based" + }, + "baseColumnName": "M|SYST", + "expression": "grel:row.record.cells[columnName].value[0]", + "onError": "set-to-blank", + "newColumnName": "67XX", + "columnInsertIndex": 69, + "description": "Create column 67xx at index 69 based on column M|SYST using expression grel:row.record.cells[columnName].value[0]" + } +] diff --git a/bibliotheca/config/main/template.txt b/bibliotheca/config/main/template.txt index 7e104d9..3b9274b 100644 --- a/bibliotheca/config/main/template.txt +++ b/bibliotheca/config/main/template.txt @@ -27,6 +27,7 @@ with( '3000', '3010', '3110', + '3210', '4000a', '4000d', '4000h', @@ -37,6 +38,7 @@ with( '4061', '4062', '4204', + '67XX', '7100j', '7100f', '7100a', diff --git a/pica+/config/template.txt b/pica+/config/template.txt index 324b9d6..af30ca8 100644 --- a/pica+/config/template.txt +++ b/pica+/config/template.txt @@ -19,6 +19,7 @@ if(row.index - row.record.fromRowIndex == 0, + forNonBlank(cells['1131'].value, v, '013D ' + 'a' + v + '\n', '') + forNonBlank(cells['1140'].value, v, '013H ' + 'a' + v + '\n', '') + forNonBlank(cells['4000a'].value, v, '021A ' + 'a' + v + forNonBlank(cells['4000d'].value, v, 'd' + v, '') + forNonBlank(cells['4000h'].value, v, 'h' + v, '') + '\n', '') ++ forNonBlank(cells['3210'].value, v, '022A/00 ' + 'a' + v + '\n', '') + forNonBlank(cells['3000'].value, v, '028A ' + v + '\n', '') + forNonBlank(cells['3100'].value, v, forEach(v.split('␟'),x,'028C ' + x + '\n').join(''), '') + forNonBlank(cells['3110'].value, v, forEach(v.split('␟'),x,'029F ' + x + '\n').join(''), '') @@ -40,5 +41,6 @@ with(with(rowIndex - row.record.fromRowIndex + 1, i, '00'[0,2-i.length()] + i),e + forNonBlank(cells['8200'].value, v, '209G/' + exnr + ' a' + v + '\n', '') + forNonBlank(cells['8600'].value, v, '209O/' + exnr + ' a' + v + 'x00' + '\n', '') + forNonBlank(cells['8515'].value, v, '220B/' + exnr + ' a' + v + '\n', '') ++ forNonBlank(cells['67XX'].value, v, '245Z/' + exnr + ' a' + v + '\n', '') ), '') }}