From 66a3cd240ea2b2640bc8eb1c552c8598847c1a2a Mon Sep 17 00:00:00 2001 From: Fabian Steeg Date: Tue, 25 Feb 2025 08:38:43 +0100 Subject: [PATCH] Transform `inSeries` to `alternativeTitle` in to-lobid (RPB-256) --- conf/output/test-output-57.json | 8 +------- conf/output/test-output-85.json | 7 +------ conf/output/test-output-90.json | 7 +------ conf/output/test-output-91.json | 8 +------- conf/output/test-output-92.json | 3 ++- conf/output/test-output-93.json | 3 ++- conf/output/test-output-94.json | 3 ++- conf/rpb-titel-to-lobid.fix | 16 ++++++++++------ 8 files changed, 20 insertions(+), 35 deletions(-) diff --git a/conf/output/test-output-57.json b/conf/output/test-output-57.json index 832fa6c..de75b33 100644 --- a/conf/output/test-output-57.json +++ b/conf/output/test-output-57.json @@ -11,15 +11,9 @@ "label" : "Rheinland-Pfälzische Bibliographie" } ], "title" : "Das Leben der Bilder oder die Kunst des Sehens", + "alternativeTitle" : [ "Salto ; [13]" ], "extent" : "141 S. : Ill.", "note" : [ "Aus dem Engl. übers." ], - "isPartOf" : [ { - "type" : [ "IsPartOfRelation" ], - "hasSuperordinate" : [ { - "label" : "Salto" - } ], - "numbering" : "[13]" - } ], "responsibilityStatement" : [ "John Berger" ], "publication" : [ { "location" : [ "Berlin" ], diff --git a/conf/output/test-output-85.json b/conf/output/test-output-85.json index b26ede2..b07d1d3 100644 --- a/conf/output/test-output-85.json +++ b/conf/output/test-output-85.json @@ -11,14 +11,9 @@ "label" : "Rheinland-Pfälzische Bibliographie" } ], "title" : "Wandern auf Rheinsteig und Rheinburgenweg", + "alternativeTitle" : [ "DuMont aktiv" ], "extent" : "180 Seiten : Illustrationen, Diagramme, Karten", "note" : [ "Enthält Index" ], - "isPartOf" : [ { - "type" : [ "IsPartOfRelation" ], - "hasSuperordinate" : [ { - "label" : "DuMont aktiv" - } ] - } ], "responsibilityStatement" : [ "Manfred Böckling" ], "publication" : [ { "location" : [ "Ostfildern" ], diff --git a/conf/output/test-output-90.json b/conf/output/test-output-90.json index a524ce5..4f1d1bf 100644 --- a/conf/output/test-output-90.json +++ b/conf/output/test-output-90.json @@ -10,14 +10,9 @@ "label" : "Rheinland-Pfälzische Bibliographie" } ], "title" : "Der Krieg war aus! : Nachkriegsalltag in Wittlich", + "alternativeTitle" : [ "Beiträge zur Geschichte und Kultur der Stadt Wittlich" ], "extent" : "254 S. : Ill.", "note" : [ "Darin u.a. S. 7-20: Schreier, Susanne: \"Der Krieg war aus, aber er war auch nicht aus\". - S. 21-52: Schindelka, Martina: Das Leben unter und mit der Besatzung. - S. 53-76: Fritzsche, Wolfgang: Maggeln, Hamstern und Kompensieren bestimmten die Versorgung. - S. 77-93: Fritzsche, Wolfgang: \"Von 700 Litern Schnaps ein Haus gebaut\". - S. 227-233: Schreier, Susanne: \"Das ging leise, nicht wie eine Explosion\". - S. 235-241: Schreier, Susanne: Nachkriegszeit in Wittlich." ], - "isPartOf" : [ { - "type" : [ "IsPartOfRelation" ], - "hasSuperordinate" : [ { - "label" : "Beiträge zur Geschichte und Kultur der Stadt Wittlich" - } ] - } ], "responsibilityStatement" : [ "hrsg. von Susanne Schreier im Auftr. der Stiftung Stadt Wittlich" ], "publication" : [ { "location" : [ "Wittlich" ], diff --git a/conf/output/test-output-91.json b/conf/output/test-output-91.json index d82e783..f6194d0 100644 --- a/conf/output/test-output-91.json +++ b/conf/output/test-output-91.json @@ -10,13 +10,7 @@ "label" : "Rheinland-Pfälzische Bibliographie" } ], "title" : "Adressbuch der Stadt Ems : in 3 Heften", - "isPartOf" : [ { - "type" : [ "IsPartOfRelation" ], - "hasSuperordinate" : [ { - "label" : "Bad Emser Hefte" - } ], - "numbering" : "..." - } ], + "alternativeTitle" : [ "Bad Emser Hefte ; ..." ], "responsibilityStatement" : [ "Verein für Geschichte, Denkmal- u. Landschaftspflege e.V. Bad Ems" ], "publication" : [ { "location" : [ "Bad Ems" ], diff --git a/conf/output/test-output-92.json b/conf/output/test-output-92.json index a82b89b..38f427d 100644 --- a/conf/output/test-output-92.json +++ b/conf/output/test-output-92.json @@ -5,7 +5,7 @@ "type" : [ "IsPartOfRelation" ], "hasSuperordinate" : [ { "id" : "http://rpb.lobid.org/929t163432", - "label" : "Bad Emser Hefte ; 76" + "label" : "Adressbuch der Stadt Ems : in 3 Heften" } ], "numbering" : "1 (1989)" } ], @@ -17,6 +17,7 @@ "label" : "Rheinland-Pfälzische Bibliographie" } ], "title" : "Adressbuch der Stadt Ems : in 3 Heften : 1 (1989)", + "alternativeTitle" : [ "Bad Emser Hefte ; 76" ], "extent" : "40 S.", "publication" : [ { "startDate" : "1989", diff --git a/conf/output/test-output-93.json b/conf/output/test-output-93.json index 58763a2..07df598 100644 --- a/conf/output/test-output-93.json +++ b/conf/output/test-output-93.json @@ -5,7 +5,7 @@ "type" : [ "IsPartOfRelation" ], "hasSuperordinate" : [ { "id" : "http://rpb.lobid.org/929t163432", - "label" : "Bad Emser Hefte ; 77" + "label" : "Adressbuch der Stadt Ems : in 3 Heften" } ], "numbering" : "2 ([1989])" } ], @@ -17,6 +17,7 @@ "label" : "Rheinland-Pfälzische Bibliographie" } ], "title" : "Adressbuch der Stadt Ems : in 3 Heften : 2 ([1989])", + "alternativeTitle" : [ "Bad Emser Hefte ; 77" ], "extent" : "S. 42 - 84", "publication" : [ { "startDate" : "1989", diff --git a/conf/output/test-output-94.json b/conf/output/test-output-94.json index 8b8d1bc..cb0bf14 100644 --- a/conf/output/test-output-94.json +++ b/conf/output/test-output-94.json @@ -5,7 +5,7 @@ "type" : [ "IsPartOfRelation" ], "hasSuperordinate" : [ { "id" : "http://rpb.lobid.org/929t163432", - "label" : "Bad Emser Hefte ; 78" + "label" : "Adressbuch der Stadt Ems : in 3 Heften" } ], "numbering" : "3 ([1989])" } ], @@ -17,6 +17,7 @@ "label" : "Rheinland-Pfälzische Bibliographie" } ], "title" : "Adressbuch der Stadt Ems : in 3 Heften : 3 ([1989])", + "alternativeTitle" : [ "Bad Emser Hefte ; 78" ], "extent" : "S. 86 - 128", "publication" : [ { "startDate" : "1989", diff --git a/conf/rpb-titel-to-lobid.fix b/conf/rpb-titel-to-lobid.fix index a5e2228..fde66e5 100644 --- a/conf/rpb-titel-to-lobid.fix +++ b/conf/rpb-titel-to-lobid.fix @@ -63,12 +63,6 @@ if any_equal("type", "Mehrt. Mono (ÜO)") set_field("type[].$append", "MultiVolumeBook") end -if exists("inSeries[]") - unless exists("isPartOf[]") - set_array("isPartOf[]") - end - move_field("inSeries[].*", "isPartOf[].$append") -end if any_equal("type", "Band") set_field("type[].$append", "Book") call_macro("move_here", field: "isPartOf[]") @@ -149,6 +143,16 @@ copy_field("parallelTitle[].*.value", "otherTitleInformation[].$append") # ------- "alternativeTitle" ------- move_field("alternativeTitle[]", "alternativeTitleObjects[]") copy_field("alternativeTitleObjects[].*.value", "alternativeTitle[]") +unless exists("alternativeTitle[]") + set_array("alternativeTitle[]") +end +do list_as("inSeries": "inSeries[]") + if exists("inSeries.numbering") + paste("alternativeTitle[].$append", "inSeries.value", "~;", "inSeries.numbering") + else + copy_field("inSeries.value", "alternativeTitle[].$append") + end +end # ------- "titleKeyword" ------- set_array("titleKeyword[]")