Skip to content

Commit

Permalink
Use institution if no name is provided in beacon (RPB-38)
Browse files Browse the repository at this point in the history
  • Loading branch information
fsteeg committed Nov 28, 2023
1 parent 0cb3060 commit c9ce801
Show file tree
Hide file tree
Showing 24 changed files with 37 additions and 33 deletions.
6 changes: 3 additions & 3 deletions conf/output/test-output-rppd-lobid-1.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
"sameAs" : [ {
"id" : "https://persondata.toolforge.org/redirect/gnd/commons/11855476X",
"collection" : {
"name" : "persondata.toolforge.org"
"name" : "Wikimedia Commons"
}
}, {
"id" : "http://persondata.toolforge.org/redirect/gnd/de/11855476X",
"collection" : {
"name" : "persondata.toolforge.org"
"name" : "Deutschsprachige Wikipedia"
}
}, {
"id" : "https://www.lagis-hessen.de/pnd/11855476X",
Expand All @@ -21,7 +21,7 @@
}, {
"id" : "https://www.deutsche-biographie.de/pnd11855476X.html#ndbcontent",
"collection" : {
"name" : "deutsche-biographie.de"
"name" : "Historische Kommission bei der Bayerischen Akademie der Wissenschaften und Bayerische Staatsbibliothek"
}
} ],
"type" : [ "AuthorityResource", "Person", "DifferentiatedPerson" ],
Expand Down
2 changes: 1 addition & 1 deletion conf/output/test-output-rppd-lobid-10.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"sameAs" : [ {
"id" : "http://persondata.toolforge.org/redirect/gnd/de/122507487",
"collection" : {
"name" : "persondata.toolforge.org"
"name" : "Deutschsprachige Wikipedia"
}
} ],
"type" : [ "AuthorityResource", "Person", "DifferentiatedPerson" ],
Expand Down
2 changes: 1 addition & 1 deletion conf/output/test-output-rppd-lobid-11.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"sameAs" : [ {
"id" : "http://persondata.toolforge.org/redirect/gnd/de/1051147387",
"collection" : {
"name" : "persondata.toolforge.org"
"name" : "Deutschsprachige Wikipedia"
}
} ],
"type" : [ "AuthorityResource", "Person", "DifferentiatedPerson" ],
Expand Down
4 changes: 2 additions & 2 deletions conf/output/test-output-rppd-lobid-12.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
"sameAs" : [ {
"id" : "https://persondata.toolforge.org/redirect/gnd/commons/123205670",
"collection" : {
"name" : "persondata.toolforge.org"
"name" : "Wikimedia Commons"
}
}, {
"id" : "http://persondata.toolforge.org/redirect/gnd/de/123205670",
"collection" : {
"name" : "persondata.toolforge.org"
"name" : "Deutschsprachige Wikipedia"
}
} ],
"type" : [ "AuthorityResource", "Person", "DifferentiatedPerson" ],
Expand Down
2 changes: 1 addition & 1 deletion conf/output/test-output-rppd-lobid-14.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"sameAs" : [ {
"id" : "https://www.deutsche-biographie.de/pnd118649558.html#adbcontent",
"collection" : {
"name" : "deutsche-biographie.de"
"name" : "Historische Kommission bei der Bayerischen Akademie der Wissenschaften und Bayerische Staatsbibliothek"
}
} ],
"type" : [ "AuthorityResource", "Person", "DifferentiatedPerson" ],
Expand Down
6 changes: 3 additions & 3 deletions conf/output/test-output-rppd-lobid-17.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@
"sameAs" : [ {
"id" : "https://www.deutsche-biographie.de/pnd119280957.html#adbcontent",
"collection" : {
"name" : "deutsche-biographie.de"
"name" : "Historische Kommission bei der Bayerischen Akademie der Wissenschaften und Bayerische Staatsbibliothek"
}
}, {
"id" : "https://persondata.toolforge.org/redirect/gnd/commons/119280957",
"collection" : {
"name" : "persondata.toolforge.org"
"name" : "Wikimedia Commons"
}
}, {
"id" : "http://persondata.toolforge.org/redirect/gnd/de/119280957",
"collection" : {
"name" : "persondata.toolforge.org"
"name" : "Deutschsprachige Wikipedia"
}
}, {
"id" : "http://www.tripota.uni-trier.de/beacon.php?ID=119280957",
Expand Down
2 changes: 1 addition & 1 deletion conf/output/test-output-rppd-lobid-18.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"sameAs" : [ {
"id" : "http://persondata.toolforge.org/redirect/gnd/de/120260948",
"collection" : {
"name" : "persondata.toolforge.org"
"name" : "Deutschsprachige Wikipedia"
}
} ],
"type" : [ "AuthorityResource", "Person", "DifferentiatedPerson" ],
Expand Down
4 changes: 2 additions & 2 deletions conf/output/test-output-rppd-lobid-20.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
"sameAs" : [ {
"id" : "http://persondata.toolforge.org/redirect/gnd/de/11698211X",
"collection" : {
"name" : "persondata.toolforge.org"
"name" : "Deutschsprachige Wikipedia"
}
}, {
"id" : "http://opac.regesta-imperii.de/lang_de/suche.php?tags=11698211X",
"collection" : {
"name" : "opac.regesta-imperii.de"
"name" : "Akademieprojekt Regesta Imperii (Quellen zur Reichsgeschichte) - Akademie der Wissenschaften und der Literatur Mainz"
}
}, {
"id" : "http://www.tripota.uni-trier.de/beacon.php?ID=11698211X",
Expand Down
2 changes: 1 addition & 1 deletion conf/output/test-output-rppd-lobid-21.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"sameAs" : [ {
"id" : "http://persondata.toolforge.org/redirect/gnd/de/105121548X",
"collection" : {
"name" : "persondata.toolforge.org"
"name" : "Deutschsprachige Wikipedia"
}
} ],
"type" : [ "AuthorityResource", "Person", "DifferentiatedPerson" ],
Expand Down
2 changes: 1 addition & 1 deletion conf/output/test-output-rppd-lobid-22.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"sameAs" : [ {
"id" : "http://persondata.toolforge.org/redirect/gnd/de/1051215498",
"collection" : {
"name" : "persondata.toolforge.org"
"name" : "Deutschsprachige Wikipedia"
}
} ],
"type" : [ "AuthorityResource", "Person", "DifferentiatedPerson" ],
Expand Down
2 changes: 1 addition & 1 deletion conf/output/test-output-rppd-lobid-23.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"sameAs" : [ {
"id" : "http://persondata.toolforge.org/redirect/gnd/de/105121551X",
"collection" : {
"name" : "persondata.toolforge.org"
"name" : "Deutschsprachige Wikipedia"
}
} ],
"type" : [ "AuthorityResource", "Person", "DifferentiatedPerson" ],
Expand Down
2 changes: 1 addition & 1 deletion conf/output/test-output-rppd-lobid-24.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"sameAs" : [ {
"id" : "http://persondata.toolforge.org/redirect/gnd/de/126790086",
"collection" : {
"name" : "persondata.toolforge.org"
"name" : "Deutschsprachige Wikipedia"
}
} ],
"type" : [ "AuthorityResource", "Person", "DifferentiatedPerson" ],
Expand Down
2 changes: 1 addition & 1 deletion conf/output/test-output-rppd-lobid-26.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"sameAs" : [ {
"id" : "http://persondata.toolforge.org/redirect/gnd/de/137243324",
"collection" : {
"name" : "persondata.toolforge.org"
"name" : "Deutschsprachige Wikipedia"
}
} ],
"type" : [ "AuthorityResource", "Person", "DifferentiatedPerson" ],
Expand Down
6 changes: 3 additions & 3 deletions conf/output/test-output-rppd-lobid-27.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@
"sameAs" : [ {
"id" : "https://persondata.toolforge.org/redirect/gnd/commons/1051215536",
"collection" : {
"name" : "persondata.toolforge.org"
"name" : "Wikimedia Commons"
}
}, {
"id" : "http://persondata.toolforge.org/redirect/gnd/de/1051215536",
"collection" : {
"name" : "persondata.toolforge.org"
"name" : "Deutschsprachige Wikipedia"
}
}, {
"id" : "http://swb.bsz-bw.de/DB=2.114/CMD?ACT=SRCHA&IKT=2011&TRM=gnd:1051215536&REC=2",
"collection" : {
"name" : "swb.bsz-bw.de"
"name" : "Bibliotheksservice-Zentrum Baden-Wuerttemberg"
}
} ],
"type" : [ "AuthorityResource", "Person", "DifferentiatedPerson" ],
Expand Down
2 changes: 1 addition & 1 deletion conf/output/test-output-rppd-lobid-32.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"sameAs" : [ {
"id" : "http://persondata.toolforge.org/redirect/gnd/de/117006084",
"collection" : {
"name" : "persondata.toolforge.org"
"name" : "Deutschsprachige Wikipedia"
}
}, {
"id" : "http://www.tripota.uni-trier.de/beacon.php?ID=117006084",
Expand Down
4 changes: 2 additions & 2 deletions conf/output/test-output-rppd-lobid-33.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
"sameAs" : [ {
"id" : "https://persondata.toolforge.org/redirect/gnd/ws-blkoe/117021652",
"collection" : {
"name" : "persondata.toolforge.org"
"name" : "Biographisches Lexikon des Kaiserthums Oesterreich (Wikisource)"
}
}, {
"id" : "http://persondata.toolforge.org/redirect/gnd/de/117021652",
"collection" : {
"name" : "persondata.toolforge.org"
"name" : "Deutschsprachige Wikipedia"
}
} ],
"type" : [ "AuthorityResource", "Person", "DifferentiatedPerson" ],
Expand Down
2 changes: 1 addition & 1 deletion conf/output/test-output-rppd-lobid-36.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"sameAs" : [ {
"id" : "http://persondata.toolforge.org/redirect/gnd/de/1051215609",
"collection" : {
"name" : "persondata.toolforge.org"
"name" : "Deutschsprachige Wikipedia"
}
} ],
"type" : [ "AuthorityResource", "Person", "DifferentiatedPerson" ],
Expand Down
2 changes: 1 addition & 1 deletion conf/output/test-output-rppd-lobid-37.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"sameAs" : [ {
"id" : "http://persondata.toolforge.org/redirect/gnd/de/1028922108",
"collection" : {
"name" : "persondata.toolforge.org"
"name" : "Deutschsprachige Wikipedia"
}
} ],
"type" : [ "AuthorityResource", "Person", "DifferentiatedPerson" ],
Expand Down
2 changes: 1 addition & 1 deletion conf/output/test-output-rppd-lobid-39.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"sameAs" : [ {
"id" : "http://persondata.toolforge.org/redirect/gnd/de/117269476",
"collection" : {
"name" : "persondata.toolforge.org"
"name" : "Deutschsprachige Wikipedia"
}
} ],
"type" : [ "AuthorityResource", "Person", "DifferentiatedPerson" ],
Expand Down
2 changes: 1 addition & 1 deletion conf/output/test-output-rppd-lobid-41.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"sameAs" : [ {
"id" : "http://persondata.toolforge.org/redirect/gnd/de/1120816653",
"collection" : {
"name" : "persondata.toolforge.org"
"name" : "Deutschsprachige Wikipedia"
}
} ],
"type" : [ "AuthorityResource", "Person", "DifferentiatedPerson" ],
Expand Down
2 changes: 1 addition & 1 deletion conf/output/test-output-rppd-lobid-5.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"sameAs" : [ {
"id" : "http://persondata.toolforge.org/redirect/gnd/de/120526433",
"collection" : {
"name" : "persondata.toolforge.org"
"name" : "Deutschsprachige Wikipedia"
}
} ],
"type" : [ "AuthorityResource", "Person", "DifferentiatedPerson" ],
Expand Down
2 changes: 1 addition & 1 deletion conf/output/test-output-rppd-lobid-7.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"sameAs" : [ {
"id" : "http://persondata.toolforge.org/redirect/gnd/de/116324899",
"collection" : {
"name" : "persondata.toolforge.org"
"name" : "Deutschsprachige Wikipedia"
}
}, {
"id" : "http://www.leo-bw.de/web/guest/detail/-/Detail/details/PERSON/wlbblb_personen/116324899/person",
Expand Down
2 changes: 1 addition & 1 deletion conf/output/test-output-rppd-lobid-9.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"sameAs" : [ {
"id" : "http://swb.bsz-bw.de/DB=2.114/CMD?ACT=SRCHA&IKT=2011&TRM=gnd:115839909&REC=2",
"collection" : {
"name" : "swb.bsz-bw.de"
"name" : "Bibliotheksservice-Zentrum Baden-Wuerttemberg"
}
} ],
"type" : [ "AuthorityResource", "Person", "DifferentiatedPerson" ],
Expand Down
6 changes: 5 additions & 1 deletion conf/rppd-beacon-to-tsv.flux
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,18 @@
default ENCODING = "UTF-8";
IN
| open-http(encoding=ENCODING)
| read-beacon(metadataFilter="name")
| read-beacon(metadataFilter="name|institution")
| fix("
# temporary workaround until https://www.historische-kommission-muenchen-editionen.de/beacond/bsb_personen.php?beacon is fixed:
replace_all('seeAlso.url', 'https://personenlexika.digitale-sammlungen.dehttps://personenlexika.digitale-sammlungen.de', 'https://personenlexika.digitale-sammlungen.de')
unless exists('seeAlso.name')
copy_field('seeAlso.institution', 'seeAlso.name')
end
unless exists('seeAlso.name')
copy_field(seeAlso.url, seeAlso.name)
replace_all(seeAlso.name, 'https?://(?:www\\\\.)?([^/]+).*', '$1')
end
retain('seeAlso.url', 'seeAlso.name')
")
| encode-csv(includeRecordId="true", includeHeader="true", noQuotes="true", separator="\t")
| write(OUT)
Expand Down

0 comments on commit c9ce801

Please sign in to comment.