From 7e6878b7be5916384f49067a02efd0aa5cf71070 Mon Sep 17 00:00:00 2001 From: Felix Lohmeier Date: Sat, 30 Apr 2022 19:37:23 +0200 Subject: [PATCH] 2010 --- alephino/config/main/T_2010.json | 15 +++++++++++++++ alephino/config/main/template.txt | 1 + 2 files changed, 16 insertions(+) create mode 100644 alephino/config/main/T_2010.json diff --git a/alephino/config/main/T_2010.json b/alephino/config/main/T_2010.json new file mode 100644 index 0000000..d6a37bc --- /dev/null +++ b/alephino/config/main/T_2010.json @@ -0,0 +1,15 @@ +[ + { + "op": "core/column-addition", + "engineConfig": { + "facets": [], + "mode": "row-based" + }, + "baseColumnName": "M|542a", + "expression": "grel:forEach(value.split('␟'), v, forNonBlank(filter(v.split('\u001f'), f, f[0] == 'a')[0].slice(1), x, '\u001f0' + x.replace('x','X'), '') + forNonBlank(filter(v.split('\u001f'), f, f[0] == 'b')[0].slice(1), x, '\u001ff' + x, '') ).join('␟')", + "onError": "set-to-blank", + "newColumnName": "2010", + "columnInsertIndex": 3, + "description": "Create column 2010" + } +] diff --git a/alephino/config/main/template.txt b/alephino/config/main/template.txt index ec36ace..aeb50a7 100644 --- a/alephino/config/main/template.txt +++ b/alephino/config/main/template.txt @@ -5,6 +5,7 @@ if(row.index - row.record.fromRowIndex == 0, + forNonBlank(cells['2000'].value, v, forEach(v.split('␟'), x, '004A ' + x + '\n').join(''), '') + forNonBlank(cells['2009'].value, v, forEach(v.split('␟'), x, '004D ' + x + '\n').join(''), '') + forNonBlank(cells['2003'].value, v, forEach(v.split('␟'), x, '004P ' + '0' + x + '\n').join(''), '') ++ forNonBlank(cells['2010'].value, v, forEach(v.split('␟'), x, '005A ' + x + '\n').join(''), '') + forNonBlank(cells['2199'].value, v, '006Y ' + '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', '')