From b54e12f41755f2400cff311a9454bace83d83784 Mon Sep 17 00:00:00 2001 From: Felix Lohmeier Date: Wed, 30 Mar 2022 21:49:30 +0200 Subject: [PATCH] 3260 --- alephino/config/main/T_3260.json | 41 +++++++++++++++++++++++++++++++ alephino/config/main/template.txt | 1 + 2 files changed, 42 insertions(+) create mode 100644 alephino/config/main/T_3260.json diff --git a/alephino/config/main/T_3260.json b/alephino/config/main/T_3260.json new file mode 100644 index 0000000..2832f96 --- /dev/null +++ b/alephino/config/main/T_3260.json @@ -0,0 +1,41 @@ +[ + { + "op": "core/column-addition", + "engineConfig": { + "facets": [], + "mode": "row-based" + }, + "baseColumnName": "M|310", + "expression": "grel:value", + "onError": "set-to-blank", + "newColumnName": "3260", + "columnInsertIndex": 3, + "description": "Create column 3260" + }, + { + "op": "core/text-transform", + "engineConfig": { + "facets": [], + "mode": "row-based" + }, + "columnName": "3260", + "expression": "grel:value.replace('¬', '')", + "onError": "keep-original", + "repeat": false, + "repeatCount": 10, + "description": "Text transform on cells in column 3260" + }, + { + "op": "core/text-transform", + "engineConfig": { + "facets": [], + "mode": "row-based" + }, + "columnName": "3260", + "expression": "grel:with(['a', 'das', 'dem', 'den', 'der', 'des', 'die', 'ein', 'eine', 'einem', 'einen', 'einer', 'eines', 'the'], x, if(inArray(x, value.split(' ')[0].toLowercase()), value.split(' ')[0] + ' @' + value.split(' ').slice(1).join(' '), value))", + "onError": "keep-original", + "repeat": false, + "repeatCount": 10, + "description": "Text transform on cells in column 3260" + } +] diff --git a/alephino/config/main/template.txt b/alephino/config/main/template.txt index 2d921b9..6c725b3 100644 --- a/alephino/config/main/template.txt +++ b/alephino/config/main/template.txt @@ -11,6 +11,7 @@ if(row.index - row.record.fromRowIndex == 0, + forNonBlank(cells['1700'].value, v, '019@ ' + forEach(v.split('‡'),x,'a' + x).join('') + '\n', '') + forNonBlank(cells['3210'].value, v, '022A/00 ' + 'a' + v + '\n', '') + forNonBlank(cells['3211'].value, v, '022A/01 ' + 'a' + v + '\n', '') ++ forNonBlank(cells['3260'].value, v, '027A ' + 'a' + v + '\n', '') + forNonBlank(cells['3000'].value, v, '028A ' + v + '\n', '') + forNonBlank(cells['3010'].value, v, forEach(v.split('␟'), x, '028C ' + x + '\n').join(''), '') + forNonBlank(cells['3100'].value, v, '029A ' + v + '\n', '')