seminar-praxis-der-digitale.../openrefine/3-1-3-3.json

91 lines
2.4 KiB
JSON
Raw Normal View History

2017-04-06 23:41:25 +02:00
[
{
"op": "core/multivalued-cell-split",
"description": "Split multi-valued cells in column 020 : a",
"columnName": "020 : a",
"keyColumnName": "001",
"separator": "␟",
"mode": "plain"
},
{
"op": "core/column-addition",
"description": "Create column ISBN at index 2 based on column 020 : a using expression grel:value",
"engineConfig": {
"mode": "row-based",
"facets": [
{
"omitError": false,
"expression": "grel:value.length()",
"selectBlank": false,
"selection": [
{
"v": {
"v": 13,
"l": "13"
}
}
],
"selectError": false,
"invert": false,
"name": "020 : a",
"omitBlank": false,
"type": "list",
"columnName": "020 : a"
}
]
},
"newColumnName": "ISBN",
"columnInsertIndex": 2,
"baseColumnName": "020 : a",
"expression": "grel:value",
"onError": "set-to-blank"
},
{
"op": "core/text-transform",
"description": "Text transform on cells in column ISBN using expression grel:with('978'+cells[\"020 : a\"].value[0,9],v,v+((10-(sum(forRange(0,12,1,i,toNumber(v[i])*(1+(i%2*2)) )) %10)) %10).toString()[0] )",
"engineConfig": {
"mode": "row-based",
"facets": [
{
"omitError": false,
"expression": "grel:value.length()",
"selectBlank": false,
"selection": [
{
"v": {
"v": 10,
"l": "10"
}
}
],
"selectError": false,
"invert": false,
"name": "020 : a",
"omitBlank": false,
"type": "list",
"columnName": "020 : a"
}
]
},
"columnName": "ISBN",
"expression": "grel:with('978'+cells[\"020 : a\"].value[0,9],v,v+((10-(sum(forRange(0,12,1,i,toNumber(v[i])*(1+(i%2*2)) )) %10)) %10).toString()[0] )",
"onError": "keep-original",
"repeat": false,
"repeatCount": 10
},
{
"op": "core/multivalued-cell-join",
"description": "Join multi-valued cells in column ISBN",
"columnName": "ISBN",
"keyColumnName": "001",
"separator": "␟"
},
{
"op": "core/multivalued-cell-join",
"description": "Join multi-valued cells in column 020 : a",
"columnName": "020 : a",
"keyColumnName": "001",
"separator": "␟"
}
]