From 409529a1c717bed4c25888ac8ac42b228fcc4359 Mon Sep 17 00:00:00 2001 From: Fabian Steeg Date: Tue, 11 Feb 2025 15:26:48 +0100 Subject: [PATCH] Improve comment removal pattern for contribution URIs (RPB-256) --- conf/output/test-output-90.json | 24 ++++++++++++------------ conf/output/test-output-strapi.json | 2 +- conf/rpb-titel-to-strapi.fix | 2 +- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/conf/output/test-output-90.json b/conf/output/test-output-90.json index 6e92786..a524ce5 100644 --- a/conf/output/test-output-90.json +++ b/conf/output/test-output-90.json @@ -68,8 +68,8 @@ "type" : [ "Contribution" ] }, { "agent" : { - "id" : "http://rpb.lobid.org/sw/00Pn97t0624a:", - "label" : "00Pn97t0624a:", + "id" : "http://rpb.lobid.org/sw/00Pn97t0624a", + "label" : "Schreier, Susanne", "type" : [ "Person" ] }, "role" : { @@ -79,8 +79,8 @@ "type" : [ "Contribution" ] }, { "agent" : { - "id" : "http://rpb.lobid.org/sw/00Pn97t0621a:", - "label" : "00Pn97t0621a:", + "id" : "http://rpb.lobid.org/sw/00Pn97t0621a", + "label" : "Schindelka, Martina", "type" : [ "Person" ] }, "role" : { @@ -90,8 +90,8 @@ "type" : [ "Contribution" ] }, { "agent" : { - "id" : "http://rpb.lobid.org/sw/00Pn97k0134a:", - "label" : "00Pn97k0134a:", + "id" : "http://rpb.lobid.org/sw/00Pn97k0134a", + "label" : "Fritzsche, Wolfgang", "type" : [ "Person" ] }, "role" : { @@ -101,8 +101,8 @@ "type" : [ "Contribution" ] }, { "agent" : { - "id" : "http://rpb.lobid.org/sw/00Pn97k0134a:", - "label" : "00Pn97k0134a:", + "id" : "http://rpb.lobid.org/sw/00Pn97k0134a", + "label" : "Fritzsche, Wolfgang", "type" : [ "Person" ] }, "role" : { @@ -112,8 +112,8 @@ "type" : [ "Contribution" ] }, { "agent" : { - "id" : "http://rpb.lobid.org/sw/00Pn97t0624a:", - "label" : "00Pn97t0624a:", + "id" : "http://rpb.lobid.org/sw/00Pn97t0624a", + "label" : "Schreier, Susanne", "type" : [ "Person" ] }, "role" : { @@ -123,8 +123,8 @@ "type" : [ "Contribution" ] }, { "agent" : { - "id" : "http://rpb.lobid.org/sw/00Pn97t0624a:", - "label" : "00Pn97t0624a:", + "id" : "http://rpb.lobid.org/sw/00Pn97t0624a", + "label" : "Schreier, Susanne", "type" : [ "Person" ] }, "role" : { diff --git a/conf/output/test-output-strapi.json b/conf/output/test-output-strapi.json index 0cd788a..15db131 100644 --- a/conf/output/test-output-strapi.json +++ b/conf/output/test-output-strapi.json @@ -88,4 +88,4 @@ {"f35_":"_r99_ _o232080600101_ ; _sn240400_","f37_":"_sn240400_ ; _r99_ _o232080600101_","f96_":"20230112/12:09:16\u001FZR","f97x":"mbd","f97y":"Einspielung: Mittelrhein-Mosel-Literaturdokumentation 1945-1990 [mmb-1990-2183;Sign. Z 1184;Z 1184]","f995":"Ortsbeschreibung und Ortsgeschichte, LandschaftenOrtsbeschreibung und Ortsgeschichte, Landschaften","f997":"Meilbrück","rpbId":"121t0146618","numbering":"1","title":"2000 Jahre Meilbrück : vom römischen Tempelbezirk zur modernen Raststätte; Von den Anfängen bis zum Ende der Römerherrschaft","alternativeTitle":[{"value":"Zweitausend Jahre Meilbrück"}],"type":"u","bibliographicCitation":[{"value":"Heimatkalender Landkreis Bitburg-Prüm. - 1990, S. 74 - 78","pages":"Aus #70~, #701 ff.: S. 74 - 78"}],"publicationDate":"1990","publicationYear":"1990","extent":"Ill.","created":"ZR-19991015/00:00:00\u001FTR-MML-Import","subject":[{"value":"http://purl.org/lobid/rpb#n240400"}],"spatial":[{"value":"https://rpb.lobid.org/spatial#n232080600101"}],"item":[{"value":"Z 1184;Z 1184","type":"TR"}],"person":[{"value":"http://rpb.lobid.org/sw/00Pn02t0375a","type":"Verfasser/in"}],"inCollection":"nur RPB","volumeIn":{"numbering":"1","value":"http://rpb.lobid.org/121t0146618"}} {"f35_":"_r32_ ; _sn613010_","f37_":"_sn613010_ ; _r32_","f88_":"0341-9452","f96_":"20220120/11:22:01\u001FSP","f97y":"Einspielung: Bestand der Bibliothek der Evangelischen Kirche der Pfalz","f983":"2158","rpbId":"107t01167281","title":"Bericht über die erste ordentliche Hauptversammlung","type":"u","bibliographicCitation":[{"value":"Blätter für pfälzische Kirchengeschichte. - 1 (1925), S. 124-125","pages":"Aus #70~, #701 ff.: S. 124-125"}],"publicationDate":"1925","publicationYear":"1925","created":"ZR-20030107/00:00:00\u001FZR-EKPF","subject":[{"value":"http://purl.org/lobid/rpb#n613010"}],"spatial":[{"value":"https://rpb.lobid.org/spatial#n32"}],"subjectComponentList":[{"subjectComponent":[{"value":"http://rpb.lobid.org/sw/00Sn01s167281807a"},{"value":"https://d-nb.info/gnd/4511937-5"}]}],"responsibilityStatement":"[H. Heilmann]","url":[{"value":"https://www.dilibri.de/rlb/periodical/pageview/2495547","type":"Volltext"}],"item":[{"value":"Palat. 101/1.1925;Palat. 102/1.1925;Palat. 100/1.1925 HBL","type":"SP"}],"person":[{"value":"http://rpb.lobid.org/sw/00Pn01s22568415a","type":"Verfasser/in"}],"inCollection":"nur RPB"} {"f35_":"_r99_ _4038114n6_ ; _sn545040_","f37_":"_sn545040_ ; _r99_ _4038114n6_","f87_":"3-920388-85-2","f96_":"20080919/08:53:50\u001FZR","rpbId":"929t061308","title":"Die Mühlsteinbrüche zwischen Mayen und dem Laacher See","type":"Monografie","publicationLocation":"Koblenz","publishedBy":"Görres","publicationDate":"2000","publicationYear":"2000","extent":"S. 386 - 432 : Ill., Kt.","created":"20060704/12:39:53\u001FKO","subject":[{"value":"http://purl.org/lobid/rpb#n545040"}],"spatial":[{"value":"https://d-nb.info/gnd/4038114-6"}],"subjectComponentList":[{"subjectComponent":[{"value":"https://d-nb.info/gnd/4038114-6"},{"value":"https://d-nb.info/gnd/4327809-7"},{"value":"https://d-nb.info/gnd/4057145-2"},{"value":"https://d-nb.info/gnd/4033914-2"},{"value":"http://rpb.lobid.org/sw/00Sn06k1308307a"}]}],"responsibilityStatement":"von dem Herrn Bergmeister Schulze zu Düren. Abschrift aus \"Archiv für Bergbau und Hüttenwesen\", hrsg. von C. J. B. Karsten, Bd. 17, Berlin 1828, von Klaus Schmidt","item":[{"value":"C2001/210","type":"KO"}],"person":[{"value":"http://rpb.lobid.org/sw/00Pn06k1308579b","type":"Sonstige"},{"value":"http://rpb.lobid.org/sw/00Pn91t0643a","type":"Sonstige"}],"inCollection":"nur RPB","isbn":[{"value":"3-920388-85-2","valid":true}]} -{"f35_":"_r99_ _o23100134_ ; _sn240400_","f37_":"_sn240400_ ; _r99_ _o23100134_","f87_":"3-9802913-8-3","f96_":"ZR-19980310/16:15:54\u001FZR","rpbId":"121t970621","title":"Der Krieg war aus! : Nachkriegsalltag in Wittlich","type":"Monografie","publicationLocation":"Wittlich","publishedBy":"Stiftung Stadt Wittlich","publicationDate":"1997","publicationYear":"1997","extent":"254 S. : Ill.","note":[{"value":"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."}],"created":"ZR-19980310/16:15:54\u001FZR","subject":[{"value":"http://purl.org/lobid/rpb#n240400"}],"spatial":[{"value":"https://rpb.lobid.org/spatial#n23100134"}],"subjectComponentList":[{"subjectComponent":[{"value":"http://rpb.lobid.org/sw/z60"}]}],"inSeries":[{"value":"Beiträge zur Geschichte und Kultur der Stadt Wittlich"}],"responsibilityStatement":"hrsg. von Susanne Schreier im Auftr. der Stiftung Stadt Wittlich","item":[{"value":"98 A 102","type":"TR"}],"person":[{"value":"http://rpb.lobid.org/sw/00Pn97t0624a","type":"Herausgeber/in"},{"value":"http://rpb.lobid.org/sw/00Pn97t0624a:","type":"Sonstige"},{"value":"http://rpb.lobid.org/sw/00Pn97t0621a:","type":"Sonstige"},{"value":"http://rpb.lobid.org/sw/00Pn97k0134a:","type":"Sonstige"},{"value":"http://rpb.lobid.org/sw/00Pn97k0134a:","type":"Sonstige"},{"value":"http://rpb.lobid.org/sw/00Pn97t0624a:","type":"Sonstige"},{"value":"http://rpb.lobid.org/sw/00Pn97t0624a:","type":"Sonstige"}],"corporateBody":[{"value":"https://d-nb.info/gnd/5270920-6","type":"Herausgebendes Organ"}],"inCollection":"nur RPB","isbn":[{"value":"3-9802913-8-3","valid":true}]} +{"f35_":"_r99_ _o23100134_ ; _sn240400_","f37_":"_sn240400_ ; _r99_ _o23100134_","f87_":"3-9802913-8-3","f96_":"ZR-19980310/16:15:54\u001FZR","rpbId":"121t970621","title":"Der Krieg war aus! : Nachkriegsalltag in Wittlich","type":"Monografie","publicationLocation":"Wittlich","publishedBy":"Stiftung Stadt Wittlich","publicationDate":"1997","publicationYear":"1997","extent":"254 S. : Ill.","note":[{"value":"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."}],"created":"ZR-19980310/16:15:54\u001FZR","subject":[{"value":"http://purl.org/lobid/rpb#n240400"}],"spatial":[{"value":"https://rpb.lobid.org/spatial#n23100134"}],"subjectComponentList":[{"subjectComponent":[{"value":"http://rpb.lobid.org/sw/z60"}]}],"inSeries":[{"value":"Beiträge zur Geschichte und Kultur der Stadt Wittlich"}],"responsibilityStatement":"hrsg. von Susanne Schreier im Auftr. der Stiftung Stadt Wittlich","item":[{"value":"98 A 102","type":"TR"}],"person":[{"value":"http://rpb.lobid.org/sw/00Pn97t0624a","type":"Herausgeber/in"},{"value":"http://rpb.lobid.org/sw/00Pn97t0624a","type":"Sonstige"},{"value":"http://rpb.lobid.org/sw/00Pn97t0621a","type":"Sonstige"},{"value":"http://rpb.lobid.org/sw/00Pn97k0134a","type":"Sonstige"},{"value":"http://rpb.lobid.org/sw/00Pn97k0134a","type":"Sonstige"},{"value":"http://rpb.lobid.org/sw/00Pn97t0624a","type":"Sonstige"},{"value":"http://rpb.lobid.org/sw/00Pn97t0624a","type":"Sonstige"}],"corporateBody":[{"value":"https://d-nb.info/gnd/5270920-6","type":"Herausgebendes Organ"}],"inCollection":"nur RPB","isbn":[{"value":"3-9802913-8-3","valid":true}]} diff --git a/conf/rpb-titel-to-strapi.fix b/conf/rpb-titel-to-strapi.fix index ab7bf8b..e0ae8ed 100644 --- a/conf/rpb-titel-to-strapi.fix +++ b/conf/rpb-titel-to-strapi.fix @@ -55,7 +55,7 @@ do put_macro("contribution_to_uri") replace_all("$i.value", "(^\\d*)n(\\d)", "$1-$2") prepend("$i.value", "https://d-nb.info/gnd/") end - replace_all("$i.value", "\\s.*", "") + replace_all("$i.value", ":?\\s.*", "") end end