From 788cde752de8556104ea225649df35c7a99b4aa4 Mon Sep 17 00:00:00 2001 From: Felix Lohmeier Date: Thu, 4 Mar 2021 15:22:19 +0100 Subject: [PATCH] Verfasser/Personen 3000 und 3010 --- bibliotheca/Taskfile.yml | 2 + bibliotheca/config/main/3000-3010.json | 409 +++++++++++++++++++++++++ bibliotheca/config/main/template.txt | 2 + pica+/config/template.txt | 2 + 4 files changed, 415 insertions(+) create mode 100644 bibliotheca/config/main/3000-3010.json diff --git a/bibliotheca/Taskfile.yml b/bibliotheca/Taskfile.yml index e0ace67..73d86e3 100644 --- a/bibliotheca/Taskfile.yml +++ b/bibliotheca/Taskfile.yml @@ -135,6 +135,8 @@ tasks: "$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_T_07, spec_B_T_08: 1. Verfasser in 3000 und weitere in 3100; Ausnahme Glauchau: PERS1 bis PERS5 vorher leeren + "$CLIENT" -P {{.PORT}} {{.PROJECT}} --apply config/main/3000-3010.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/3000-3010.json b/bibliotheca/config/main/3000-3010.json new file mode 100644 index 0000000..7fa7f17 --- /dev/null +++ b/bibliotheca/config/main/3000-3010.json @@ -0,0 +1,409 @@ +[ + { + "op": "core/text-transform", + "engineConfig": { + "facets": [ + { + "type": "list", + "name": "File", + "expression": "value", + "columnName": "File", + "invert": false, + "omitBlank": false, + "omitError": false, + "selection": [ + { + "v": { + "v": "GC", + "l": "GC" + } + } + ], + "selectBlank": false, + "selectError": false + }, + { + "type": "list", + "name": "M|PERS1", + "expression": "isBlank(value)", + "columnName": "M|PERS1", + "invert": false, + "omitBlank": false, + "omitError": false, + "selection": [ + { + "v": { + "v": false, + "l": "false" + } + } + ], + "selectBlank": false, + "selectError": false + }, + { + "type": "text", + "name": "M|PERS1", + "columnName": "M|PERS1", + "query": ",", + "mode": "text", + "caseSensitive": false, + "invert": true + }, + { + "type": "text", + "name": "M|PERS1", + "columnName": "M|PERS1", + "query": "^Alain|^Anonymous|^Aristoteles|^Brüder Grimm ¬[ErwähnteR]¬|^Bstan-vdzin-rgya-mtsho |^Domenica|^Eckart (Meister)|^Eckehart (Meister)|^El Bocho|^Epictetus|^Epicurus|^Eusebius |^Gabo|^Hildegard von Bingen|^Hildegardis |^Hippocrates|^Ignatius |^Ishmael|^Janosch|^Johannes |^Johannes Paul II.|^Kuba|^Laotse|^Le Corbusier|^Leila|^Muhammad|^Muhammad Ali|^Paul VI.|^Piero|^Plato|^Platon|^Polycarpus |^Sick [VerfasserIn]|^Starhawk|^Sting |^Sunyata ¬[IllustratorIn]¬|^Tintoretto|^Tom|^Trio Virilent|^Xenophon", + "mode": "regex", + "caseSensitive": false, + "invert": true + } + ], + "mode": "row-based" + }, + "columnName": "M|PERS1", + "expression": "grel:null", + "onError": "keep-original", + "repeat": false, + "repeatCount": 10, + "description": "Text transform on cells in column M|PERS1 using expression grel:null" + }, + { + "op": "core/text-transform", + "engineConfig": { + "facets": [ + { + "type": "list", + "name": "File", + "expression": "value", + "columnName": "File", + "invert": false, + "omitBlank": false, + "omitError": false, + "selection": [ + { + "v": { + "v": "GC", + "l": "GC" + } + } + ], + "selectBlank": false, + "selectError": false + }, + { + "type": "list", + "name": "M|PERS2", + "expression": "isBlank(value)", + "columnName": "M|PERS2", + "invert": false, + "omitBlank": false, + "omitError": false, + "selection": [ + { + "v": { + "v": false, + "l": "false" + } + } + ], + "selectBlank": false, + "selectError": false + }, + { + "type": "text", + "name": "M|PERS2", + "columnName": "M|PERS2", + "query": ",", + "mode": "text", + "caseSensitive": false, + "invert": true + }, + { + "type": "text", + "name": "M|PERS2", + "columnName": "M|PERS2", + "query": "^Alain|^Anonymous|^Aristoteles|^Brüder Grimm ¬[ErwähnteR]¬|^Bstan-vdzin-rgya-mtsho |^Domenica|^Eckart (Meister)|^Eckehart (Meister)|^El Bocho|^Epictetus|^Epicurus|^Eusebius |^Gabo|^Hildegard von Bingen|^Hildegardis |^Hippocrates|^Ignatius |^Ishmael|^Janosch|^Johannes |^Johannes Paul II.|^Kuba|^Laotse|^Le Corbusier|^Leila|^Muhammad|^Muhammad Ali|^Paul VI.|^Piero|^Plato|^Platon|^Polycarpus |^Sick [VerfasserIn]|^Starhawk|^Sting |^Sunyata ¬[IllustratorIn]¬|^Tintoretto|^Tom|^Trio Virilent|^Xenophon", + "mode": "regex", + "caseSensitive": false, + "invert": true + } + ], + "mode": "row-based" + }, + "columnName": "M|PERS2", + "expression": "grel:null", + "onError": "keep-original", + "repeat": false, + "repeatCount": 10, + "description": "Text transform on cells in column M|PERS2 using expression grel:null" + }, + { + "op": "core/text-transform", + "engineConfig": { + "facets": [ + { + "type": "list", + "name": "File", + "expression": "value", + "columnName": "File", + "invert": false, + "omitBlank": false, + "omitError": false, + "selection": [ + { + "v": { + "v": "GC", + "l": "GC" + } + } + ], + "selectBlank": false, + "selectError": false + }, + { + "type": "list", + "name": "M|PERS3", + "expression": "isBlank(value)", + "columnName": "M|PERS3", + "invert": false, + "omitBlank": false, + "omitError": false, + "selection": [ + { + "v": { + "v": false, + "l": "false" + } + } + ], + "selectBlank": false, + "selectError": false + }, + { + "type": "text", + "name": "M|PERS3", + "columnName": "M|PERS3", + "query": ",", + "mode": "text", + "caseSensitive": false, + "invert": true + }, + { + "type": "text", + "name": "M|PERS3", + "columnName": "M|PERS3", + "query": "^Alain|^Anonymous|^Aristoteles|^Brüder Grimm ¬[ErwähnteR]¬|^Bstan-vdzin-rgya-mtsho |^Domenica|^Eckart (Meister)|^Eckehart (Meister)|^El Bocho|^Epictetus|^Epicurus|^Eusebius |^Gabo|^Hildegard von Bingen|^Hildegardis |^Hippocrates|^Ignatius |^Ishmael|^Janosch|^Johannes |^Johannes Paul II.|^Kuba|^Laotse|^Le Corbusier|^Leila|^Muhammad|^Muhammad Ali|^Paul VI.|^Piero|^Plato|^Platon|^Polycarpus |^Sick [VerfasserIn]|^Starhawk|^Sting |^Sunyata ¬[IllustratorIn]¬|^Tintoretto|^Tom|^Trio Virilent|^Xenophon", + "mode": "regex", + "caseSensitive": false, + "invert": true + } + ], + "mode": "row-based" + }, + "columnName": "M|PERS3", + "expression": "grel:null", + "onError": "keep-original", + "repeat": false, + "repeatCount": 10, + "description": "Text transform on cells in column M|PERS3 using expression grel:null" + }, + { + "op": "core/text-transform", + "engineConfig": { + "facets": [ + { + "type": "list", + "name": "File", + "expression": "value", + "columnName": "File", + "invert": false, + "omitBlank": false, + "omitError": false, + "selection": [ + { + "v": { + "v": "GC", + "l": "GC" + } + } + ], + "selectBlank": false, + "selectError": false + }, + { + "type": "list", + "name": "M|PERS4", + "expression": "isBlank(value)", + "columnName": "M|PERS4", + "invert": false, + "omitBlank": false, + "omitError": false, + "selection": [ + { + "v": { + "v": false, + "l": "false" + } + } + ], + "selectBlank": false, + "selectError": false + }, + { + "type": "text", + "name": "M|PERS4", + "columnName": "M|PERS4", + "query": ",", + "mode": "text", + "caseSensitive": false, + "invert": true + }, + { + "type": "text", + "name": "M|PERS4", + "columnName": "M|PERS4", + "query": "^Alain|^Anonymous|^Aristoteles|^Brüder Grimm ¬[ErwähnteR]¬|^Bstan-vdzin-rgya-mtsho |^Domenica|^Eckart (Meister)|^Eckehart (Meister)|^El Bocho|^Epictetus|^Epicurus|^Eusebius |^Gabo|^Hildegard von Bingen|^Hildegardis |^Hippocrates|^Ignatius |^Ishmael|^Janosch|^Johannes |^Johannes Paul II.|^Kuba|^Laotse|^Le Corbusier|^Leila|^Muhammad|^Muhammad Ali|^Paul VI.|^Piero|^Plato|^Platon|^Polycarpus |^Sick [VerfasserIn]|^Starhawk|^Sting |^Sunyata ¬[IllustratorIn]¬|^Tintoretto|^Tom|^Trio Virilent|^Xenophon", + "mode": "regex", + "caseSensitive": false, + "invert": true + } + ], + "mode": "row-based" + }, + "columnName": "M|PERS4", + "expression": "grel:null", + "onError": "keep-original", + "repeat": false, + "repeatCount": 10, + "description": "Text transform on cells in column M|PERS4 using expression grel:null" + }, + { + "op": "core/text-transform", + "engineConfig": { + "facets": [ + { + "type": "list", + "name": "File", + "expression": "value", + "columnName": "File", + "invert": false, + "omitBlank": false, + "omitError": false, + "selection": [ + { + "v": { + "v": "GC", + "l": "GC" + } + } + ], + "selectBlank": false, + "selectError": false + }, + { + "type": "list", + "name": "M|PERS5", + "expression": "isBlank(value)", + "columnName": "M|PERS5", + "invert": false, + "omitBlank": false, + "omitError": false, + "selection": [ + { + "v": { + "v": false, + "l": "false" + } + } + ], + "selectBlank": false, + "selectError": false + }, + { + "type": "text", + "name": "M|PERS5", + "columnName": "M|PERS5", + "query": ",", + "mode": "text", + "caseSensitive": false, + "invert": true + }, + { + "type": "text", + "name": "M|PERS5", + "columnName": "M|PERS5", + "query": "^Alain|^Anonymous|^Aristoteles|^Brüder Grimm ¬[ErwähnteR]¬|^Bstan-vdzin-rgya-mtsho |^Domenica|^Eckart (Meister)|^Eckehart (Meister)|^El Bocho|^Epictetus|^Epicurus|^Eusebius |^Gabo|^Hildegard von Bingen|^Hildegardis |^Hippocrates|^Ignatius |^Ishmael|^Janosch|^Johannes |^Johannes Paul II.|^Kuba|^Laotse|^Le Corbusier|^Leila|^Muhammad|^Muhammad Ali|^Paul VI.|^Piero|^Plato|^Platon|^Polycarpus |^Sick [VerfasserIn]|^Starhawk|^Sting |^Sunyata ¬[IllustratorIn]¬|^Tintoretto|^Tom|^Trio Virilent|^Xenophon", + "mode": "regex", + "caseSensitive": false, + "invert": true + } + ], + "mode": "row-based" + }, + "columnName": "M|PERS5", + "expression": "grel:null", + "onError": "keep-original", + "repeat": false, + "repeatCount": 10, + "description": "Text transform on cells in column M|PERS5 using expression grel:null" + }, + { + "op": "core/column-addition", + "engineConfig": { + "facets": [], + "mode": "row-based" + }, + "baseColumnName": "M|VERF1", + "expression": "grel:[ cells['M|VERF1'].value, cells['M|VERF2'].value, cells['M|VERF3'].value, cells['M|PERS1'].value, cells['M|PERS2'].value, cells['M|PERS3'].value, cells['M|PERS4'].value, cells['M|PERS5'].value ].join('␟')", + "onError": "set-to-blank", + "newColumnName": "tmp", + "columnInsertIndex": 103, + "description": "Create column tmp at index 103 based on column M|VERF1 using expression grel:[ cells['M|VERF1'].value, cells['M|VERF2'].value, cells['M|VERF3'].value, cells['M|PERS1'].value, cells['M|PERS2'].value, cells['M|PERS3'].value, cells['M|PERS4'].value, cells['M|PERS5'].value ].join('␟')" + }, + { + "op": "core/text-transform", + "engineConfig": { + "facets": [], + "mode": "row-based" + }, + "columnName": "tmp", + "expression": "grel:forEach(value.split('␟'),v,v.replace(/\\s¬?\\[.*/,'')).join('␟')", + "onError": "keep-original", + "repeat": false, + "repeatCount": 10, + "description": "Text transform on cells in column tmp using expression grel:forEach(value.split('␟'),v,v.replace(/\\s¬?\\[.*/,'')).join('␟')" + }, + { + "op": "core/column-addition", + "engineConfig": { + "facets": [], + "mode": "row-based" + }, + "baseColumnName": "tmp", + "expression": "grel:forEach(value.split('␟').slice(0,1), v, if(v.contains(','), '\u001fa' + v.split(',')[0].trim() + '\u001fd' + v.split(',')[1].replace(/¬.*¬/,'').trim() + forNonBlank(value.find(/¬.+¬/)[0].replace('¬',''), x, '\u001fc' + x, ''), '\u001fP' + v)).join('␟')", + "onError": "set-to-blank", + "newColumnName": "3000", + "columnInsertIndex": 104, + "description": "Create column 3000 at index 104 based on column tmp using expression grel:forEach(value.split('␟').slice(0,1), v, if(v.contains(','), '\u001fa' + v.split(',')[0].trim() + '\u001fd' + v.split(',')[1].replace(/¬.*¬/,'').trim() + forNonBlank(value.find(/¬.+¬/)[0].replace('¬',''), x, '\u001fc' + x, ''), '\u001fP' + v)).join('␟')" + }, + { + "op": "core/column-addition", + "engineConfig": { + "facets": [], + "mode": "row-based" + }, + "baseColumnName": "tmp", + "expression": "grel:forEach(value.split('␟').slice(1), v, if(v.contains(','), '\u001fa' + v.split(',')[0].trim() + '\u001fd' + v.split(',')[1].replace(/¬.*¬/,'').trim() + forNonBlank(value.find(/¬.+¬/)[0].replace('¬',''), x, '\u001fc' + x, ''), '\u001fP' + v)).join('␟')", + "onError": "set-to-blank", + "newColumnName": "3010", + "columnInsertIndex": 104, + "description": "Create column 3010 at index 104 based on column tmp using expression grel:forEach(value.split('␟').slice(1), v, if(v.contains(','), '\u001fa' + v.split(',')[0].trim() + '\u001fd' + v.split(',')[1].replace(/¬.*¬/,'').trim() + forNonBlank(value.find(/¬.+¬/)[0].replace('¬',''), x, '\u001fc' + x, ''), '\u001fP' + v)).join('␟')" + }, + { + "op": "core/column-removal", + "columnName": "tmp", + "description": "Remove column tmp" + } +] diff --git a/bibliotheca/config/main/template.txt b/bibliotheca/config/main/template.txt index b93be92..529d610 100644 --- a/bibliotheca/config/main/template.txt +++ b/bibliotheca/config/main/template.txt @@ -24,6 +24,8 @@ with( '2020', '2201', '2240', + '3000', + '3010', '4000a', '4000d', '4020a', diff --git a/pica+/config/template.txt b/pica+/config/template.txt index 44a0bfd..dea16eb 100644 --- a/pica+/config/template.txt +++ b/pica+/config/template.txt @@ -19,6 +19,8 @@ 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, '') + '\n', '') ++ forNonBlank(cells['3000'].value, v, '028A ' + v + '\n', '') ++ forNonBlank(cells['3100'].value, v, forEach(v.split('␟'),x,'028C ' + x + '\n').join(''), '') + forNonBlank(cells['4020a'].value, v, '032@ ' + 'a' + v + '\n', '') + if(or(isNonBlank(cells['4030n'].value),isNonBlank(cells['4030p'].value)),'033A ' + forNonBlank(cells['4030n'].value, v, 'n' + v,'') + forNonBlank(cells['4030p'].value, v, 'p' + v, '') + '\n', '') + forNonBlank(cells['4060a'].value, v, '034D ' + 'a' + v + '\n', '')