Bei MEKZ ACQ auch Titeldaten löschen

This commit is contained in:
Felix Lohmeier 2021-01-12 18:07:12 +01:00
parent ab8a135425
commit 051424c406
2 changed files with 119 additions and 41 deletions

View File

@ -182,6 +182,125 @@ else
fi
echo
# -------------------------- ACQ Datensätze löschen -------------------------- #
# spec_Z_03
# löscht alle Titel und deren Exemplare, die das Kennzeichen ACQ enthalten
# löscht dann alle verbliebenen Exemplare mit Kennzeichen ACQ
echo "ACQ Datensätze löschen..."
if curl -fs \
--data project="${projects[$p]}" \
--data-urlencode "operations@-" \
"${endpoint}/command/core/apply-operations$(refine_csrf)" > /dev/null \
<< "JSON"
[
{
"op": "core/column-addition",
"engineConfig": {
"facets": [
{
"type": "text",
"name": "Column 1",
"columnName": "Column 1",
"query": "*********M",
"mode": "text",
"caseSensitive": false,
"invert": false
}
],
"mode": "record-based"
},
"baseColumnName": "Column 1",
"expression": "grel:value",
"onError": "set-to-blank",
"newColumnName": "tmp",
"columnInsertIndex": 1
},
{
"op": "core/column-move",
"columnName": "tmp",
"index": 0
},
{
"op": "core/row-removal",
"engineConfig": {
"facets": [
{
"type": "list",
"name": "Column 1",
"expression": "grel:if(isNonBlank(cells['tmp'].value),with(row.record.cells[columnName].value.join('').find(/MEKZ ./).uniques().join(''),v,v),null)",
"columnName": "Column 1",
"invert": false,
"omitBlank": false,
"omitError": false,
"selection": [
{
"v": {
"v": "MEKZ ACQ",
"l": "MEKZ ACQ"
}
}
],
"selectBlank": false,
"selectError": false
}
],
"mode": "record-based"
}
},
{
"op": "core/text-transform",
"engineConfig": {
"facets": [
{
"type": "text",
"name": "Column 1",
"columnName": "Column 1",
"query": "*********E",
"mode": "text",
"caseSensitive": false,
"invert": false
}
],
"mode": "row-based"
},
"columnName": "tmp",
"expression": "grel:cells['Column 1'].value",
"onError": "keep-original",
"repeat": false,
"repeatCount": 10
},
{
"op": "core/row-removal",
"engineConfig": {
"facets": [
{
"type": "text",
"name": "Column 1",
"columnName": "Column 1",
"query": "MEKZ ACQ",
"mode": "text",
"caseSensitive": false,
"invert": false
}
],
"mode": "record-based"
}
},
{
"op": "core/column-removal",
"columnName": "tmp"
}
]
JSON
then
log "transformed ${p} (${projects[$p]})"
else
error "transform ${p} (${projects[$p]}) failed!"
fi
echo
# ---------------------- Mehrzeilige Inhalte extrahieren --------------------- #
# - Column 1 > Text filter > regular expression aktivieren > ^\* > invert

View File

@ -2684,9 +2684,6 @@ echo
# ----------------------------------- E0XXb ---------------------------------- #
# spec_B_E_14, spec_Z_03, spec_B_E16
# leer für Exemplare, die nicht konvertiert werden sollen:
# - makulierte Exemplare
# - ACQ-Datensätze
# TODO: Selektionsschlüssel für Abschlussarbeiten
echo "Selektionsschlüssel E0XXb..."
if curl -fs \
@ -2717,44 +2714,6 @@ if curl -fs \
],
"selectBlank": false,
"selectError": false
},
{
"type": "list",
"name": "E|EXSTA",
"expression": "value",
"columnName": "E|EXSTA",
"invert": true,
"omitBlank": false,
"omitError": false,
"selection": [
{
"v": {
"v": "M",
"l": "M"
}
}
],
"selectBlank": false,
"selectError": false
},
{
"type": "list",
"name": "E|MEKZ",
"expression": "value",
"columnName": "E|MEKZ",
"invert": true,
"omitBlank": false,
"omitError": false,
"selection": [
{
"v": {
"v": "ACQ",
"l": "ACQ"
}
}
],
"selectBlank": false,
"selectError": false
}
],
"mode": "row-based"