Browse Source

ersetze .reverse()[0] durch [-1]

main
Felix Lohmeier 2 years ago
parent
commit
192bbef02d
  1. 2
      rules/muenster/duplicates.json
  2. 4
      rules/muenster/file-id.json
  3. 4
      rules/wuppertal/ddc.json

2
rules/muenster/duplicates.json

@ -35,7 +35,7 @@
{
"type": "list",
"name": "id",
"expression": "grel:with(value.cross('muenster', columnName), rows, if(rows.length() > 1, if(rows.index.sort().reverse()[0] > row.index, 'is duplicate of a higher row number', 'has duplicate(s) with lower row number'), 'unique'))",
"expression": "grel:with(value.cross('muenster', columnName), rows, if(rows.length() > 1, if(rows.index.sort()[-1] > row.index, 'is duplicate of a higher row number', 'has duplicate(s) with lower row number'), 'unique'))",
"columnName": "id",
"invert": false,
"omitBlank": false,

4
rules/muenster/file-id.json

@ -26,10 +26,10 @@
"mode": "row-based"
},
"columnName": "mets:mets - mets:fileSec - mets:fileGrp - mets:file - ID",
"expression": "grel:'FILE_' + row.record.cells['id'].value[0].split(':').reverse()[0] + '_' + (row.index - row.record.fromRowIndex + 1)",
"expression": "grel:'FILE_' + row.record.cells['id'].value[0].split(':')[-1] + '_' + (row.index - row.record.fromRowIndex + 1)",
"onError": "keep-original",
"repeat": false,
"repeatCount": 10,
"description": "Text transform on cells in column mets:mets - mets:fileSec - mets:fileGrp - mets:file - ID using expression grel:'FILE_' + row.record.cells['id'].value[0].split(':').reverse()[0] + '_' + (row.index - row.record.fromRowIndex + 1)"
"description": "Text transform on cells in column mets:mets - mets:fileSec - mets:fileGrp - mets:file - ID using expression grel:'FILE_' + row.record.cells['id'].value[0].split(':')[-1] + '_' + (row.index - row.record.fromRowIndex + 1)"
}
]

4
rules/wuppertal/ddc.json

@ -57,11 +57,11 @@
"mode": "row-based"
},
"columnName": "setSpec",
"expression": "grel:value.split(':').reverse()[0]",
"expression": "grel:value.split(':')[-1]",
"onError": "keep-original",
"repeat": false,
"repeatCount": 10,
"description": "Text transform on cells in column setSpec using expression grel:value.split(':').reverse()[0]"
"description": "Text transform on cells in column setSpec using expression grel:value.split(':')[-1]"
},
{
"op": "core/text-transform",

Loading…
Cancel
Save