-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/hbz/lobid-resources
- Loading branch information
Showing
24 changed files
with
103 additions
and
167 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ do list(path:"880??","var":"$i") | |
copy_field("$i.6","$i.linkageTest") | ||
replace_all("$i.linkageTest","\\d{3}(-\\d{2}).*","880$1") | ||
copy_field("$i.6","[email protected]") | ||
copy_field("$i.6","[email protected]") | ||
copy_field("$i.6","[email protected]") | ||
replace_all("[email protected]","(\\d{3}-\\d{2})/(.*)","https://unicode.org/iso15924/iso15924.txt#$2") | ||
replace_all("[email protected]","(\\d{3}-\\d{2})/(.*)","$2") | ||
lookup("[email protected]","ISO15924-to-script") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ do put_macro("alternateGraphicRepresationArrayOfObjects") | |
copy_field("$[variable].6","$[variable].linkageTest") | ||
do list(path:"880??","var":"$880") | ||
if in ("$[variable].linkageTest","$880.linkageTest") | ||
if in ("[email protected]","alternateGraphicRepresentation[].*.script.id") | ||
if in ("[email protected]","alternateGraphicRepresentation[].*.script.id") | ||
do list(path:"alternateGraphicRepresentation[]","var":"$AGR") | ||
if in ("[email protected]","$AGR.script.id") | ||
unless exists("$AGR.record.$[targetArray]") | ||
|
@@ -13,9 +13,9 @@ do put_macro("alternateGraphicRepresationArrayOfObjects") | |
copy_field("$880.a","$AGR.record.$[targetArray].$append$[targetField].label") | ||
end | ||
end | ||
else | ||
else | ||
copy_field("[email protected]","alternateGraphicRepresentation[].$append.script.id") | ||
copy_field("[email protected]","alternateGraphicRepresentation[].$last.script.label") | ||
copy_field("[email protected]","alternateGraphicRepresentation[].$last.script.label") | ||
set_array("alternateGraphicRepresentation[].$last.record.$[targetArray]") | ||
copy_field("$880.a","alternateGraphicRepresentation[].$last.record.$[targetArray].$append$[targetField].label") | ||
end | ||
|
@@ -29,21 +29,21 @@ do put_macro("alternateGraphicRepresationIsPartOf") | |
copy_field("$[variable].6","$[variable].linkageTest") | ||
do list(path:"880??","var":"$880") | ||
if in ("$[variable].linkageTest","$880.linkageTest") | ||
if in ("[email protected]","alternateGraphicRepresentation[].*.script.id") | ||
if in ("[email protected]","alternateGraphicRepresentation[].*.script.id") | ||
do list(path:"alternateGraphicRepresentation[]","var":"$AGR") | ||
if in ("[email protected]","$AGR.script.id") | ||
unless exists("$AGR.record.isPartOf[]") | ||
set_array("$AGR.record.isPartOf[]") | ||
end | ||
set_array("$AGR.record.isPartOf[].$append.hasSuperordinate[]") | ||
set_array("$AGR.record.isPartOf[].$append.hasSuperordinate[]") | ||
copy_field("$880.a","$AGR.record.isPartOf[].$last.hasSuperordinate[].$append.label") | ||
copy_field("$880.v", "$AGR.record.isPartOf[].$last.numbering") | ||
end | ||
end | ||
else | ||
else | ||
copy_field("[email protected]","alternateGraphicRepresentation[].$append.script.id") | ||
copy_field("[email protected]","alternateGraphicRepresentation[].$last.script.label") | ||
set_array("alternateGraphicRepresentation[].$last.record.isPartOf[]") | ||
set_array("alternateGraphicRepresentation[].$last.record.isPartOf[]") | ||
set_array("alternateGraphicRepresentation[].$last.record.isPartOf[].$append.hasSuperordinate[]") | ||
copy_field("$880.a","alternateGraphicRepresentation[].$last.record.isPartOf[].$last.hasSuperordinate[].$append.label") | ||
copy_field("$880.v", "alternateGraphicRepresentation[].$last.record.isPartOf[].$last.numbering") | ||
|
@@ -59,7 +59,7 @@ do put_macro("rolesFromSubfieldE") | |
unless is_array("$i.4") | ||
move_field("$i.4","$i.@4") | ||
set_array("$i.4") | ||
move_field("$i.@4","$i.4.$append") | ||
move_field("$i.@4","$i.4.$append") | ||
end | ||
do list(path:"$i.e","var":"$e") | ||
if any_match("$e","(?i).*dars.*") | ||
|
@@ -151,10 +151,10 @@ do put_macro("gndEventCombinedLabel") | |
copy_field("$[field].b","$[field].@combinedLabel.$append") | ||
join_field("$[field].@combinedLabel", ". ") # This is the difference to gnd person | ||
set_array("$[field].@combinedDetailsForEvents") | ||
copy_field("$[field].n","$[field].@combinedDetailsForEvents.$append") | ||
copy_field("$[field].n","$[field].@combinedDetailsForEvents.$append") | ||
copy_field("$[field].g","$[field].@combinedDetailsForEvents.$append") | ||
copy_field("$[field].d","$[field].@combinedDetailsForEvents.$append") | ||
copy_field("$[field].c","$[field].@combinedDetailsForEvents.$append") | ||
copy_field("$[field].c","$[field].@combinedDetailsForEvents.$append") | ||
join_field("$[field].@combinedDetailsForEvents"," : ") | ||
unless is_empty("$[field].@combinedDetailsForEvents.") | ||
paste("$[field].@combinedLabel", "$[field].@combinedLabel", "~ (", "$[field].@combinedDetailsForEvents", "~)", join_char:"") | ||
|
@@ -228,13 +228,13 @@ do put_macro("provenanceLinks") | |
elsif any_equal("$[field]", "BSZ") | ||
replace_all("$[field]", "^.*$", "DE-576") | ||
elsif any_equal("$[field]", "GBV") | ||
replace_all("$[field]", "^.*$", "DE-601") | ||
replace_all("$[field]", "^.*$", "DE-601") | ||
elsif any_equal("$[field]", "KOBV") | ||
replace_all("$[field]", "^.*$", "DE-602") | ||
replace_all("$[field]", "^.*$", "DE-602") | ||
elsif any_equal("$[field]", "HeBIS") | ||
replace_all("$[field]", "^.*$", "DE-603") | ||
replace_all("$[field]", "^.*$", "DE-603") | ||
elsif any_equal("$[field]", "BVB") | ||
replace_all("$[field]", "^.*$", "DE-604") | ||
replace_all("$[field]", "^.*$", "DE-604") | ||
elsif any_match("$[field]","^292$") | ||
replace_all("$[field]", "^292$", "DE-101b") | ||
elsif any_match("$[field]","(.*)\\/NWBib$") | ||
|
@@ -261,7 +261,7 @@ do put_macro("holdingLibrary+opacLink") | |
lookup("$i.@iz", "alma-institution-code-to-isil") | ||
copy_field("$[libraryCodeField]","$i.@sublibraryIsil") | ||
lookup("$i.@sublibraryIsil", "hbzowner2sigel",delete:"true") | ||
lookup("$i.@sublibraryIsil", "sigel2isilMap",delete:"true") | ||
lookup("$i.@sublibraryIsil", "sigel2isilMap",delete:"true") | ||
# following fix checks for sublibrary codes and if they map to provided sublocation Isil | ||
unless exists("$i.@sublibraryIsil") | ||
paste("$i.@sublibraryIsil","$i.M","~+","$[libraryCodeField]",join_char:"") | ||
|
@@ -298,27 +298,27 @@ do put_macro("opacLink") | |
copy_field("$i.$[field]", "$i.@opacAlmaMmsId") | ||
lookup("$i.@opacAlmaMmsId","isil2opac_almaMmsId", delete:"true") | ||
split_field("$i.@opacAlmaMmsId","\\{almaMmsId\\}") | ||
if exists("issn[].1") | ||
copy_field("$i.$[field]", "$i.@opacLinkIssn") | ||
lookup("$i.@opacLinkIssn","isil2opac_issn", delete:"true") | ||
split_field("$i.@opacLinkIssn","\\{issn\\}") | ||
end | ||
if exists("isbn[].1") | ||
copy_field("$i.$[field]", "$i.@opacLinkIsbn") | ||
lookup("$i.@opacLinkIsbn","isil2opac_isbn", delete:"true") | ||
split_field("$i.@opacLinkZdbId","\\{isbn\\}") | ||
end | ||
# if exists("issn[].1") | ||
# copy_field("$i.$[field]", "$i.@opacLinkIssn") | ||
# lookup("$i.@opacLinkIssn","isil2opac_issn", delete:"true") | ||
# split_field("$i.@opacLinkIssn","\\{issn\\}") | ||
# end | ||
# if exists("isbn[].1") | ||
# copy_field("$i.$[field]", "$i.@opacLinkIsbn") | ||
# lookup("$i.@opacLinkIsbn","isil2opac_isbn", delete:"true") | ||
# split_field("$i.@opacLinkZdbId","\\{isbn\\}") | ||
# end | ||
set_array("hasItem[].$last.seeAlso[]") | ||
if exists("[email protected]") | ||
if exists("[email protected]") | ||
paste("hasItem[].$last.seeAlso[].$append","[email protected]","almaMmsId","[email protected]",join_char:"") | ||
elsif exists("[email protected]") | ||
paste("hasItem[].$last.seeAlso[].$append","[email protected]","zdbId","[email protected]",join_char:"") | ||
elsif exists("[email protected]") | ||
paste("hasItem[].$last.seeAlso[].$append","[email protected]","hbzId","[email protected]",join_char:"") | ||
elsif exists("[email protected]") | ||
paste("hasItem[].$last.seeAlso[].$append","[email protected]","almaMmsId","[email protected]",join_char:"") | ||
elsif exists("[email protected]") | ||
paste("hasItem[].$last.seeAlso[].$append","[email protected]","isbn[].1","[email protected]",join_char:"") | ||
elsif exists("[email protected]") | ||
paste("hasItem[].$last.seeAlso[].$append","[email protected]","issn[].1","[email protected]",join_char:"") | ||
# elsif exists("[email protected]") | ||
# paste("hasItem[].$last.seeAlso[].$append","[email protected]","isbn[].1","[email protected]",join_char:"") | ||
# elsif exists("[email protected]") | ||
# paste("hasItem[].$last.seeAlso[].$append","[email protected]","issn[].1","[email protected]",join_char:"") | ||
end | ||
end | ||
|
||
|
@@ -341,7 +341,7 @@ do put_macro("schlagwortfolge") | |
if any_equal("subject[].$last.componentList[].$last.type[]","p") | ||
call_macro("gndPersonCombinedLabel",field:"$i") | ||
elsif any_equal("subject[].$last.componentList[].$last.type[]","f") | ||
call_macro("gndEventCombinedLabel",field:"$i") | ||
call_macro("gndEventCombinedLabel",field:"$i") | ||
else | ||
call_macro("gndOtherCombinedLabel",field:"$i") | ||
end | ||
|
@@ -421,25 +421,25 @@ do put_macro("publication") | |
copy_field("$i.6","$i.linkageTest") | ||
do list(path:"880??","var":"$880") | ||
if in ("$i.linkageTest","$880.linkageTest") | ||
if in ("[email protected]","alternateGraphicRepresentation[].*.script.id") | ||
if in ("[email protected]","alternateGraphicRepresentation[].*.script.id") | ||
do list(path:"alternateGraphicRepresentation[]","var":"$AGR") | ||
if in ("[email protected]","$AGR.script.id") | ||
unless exists("$AGR.record.publication[]") | ||
set_array("$AGR.record.publication[]") | ||
end | ||
add_field ("$AGR.record.publication[].$append.dummi","") | ||
set_array("$AGR.record.publication[].$last.location[]") | ||
end | ||
add_field ("$AGR.record.publication[].$append.dummi","") | ||
set_array("$AGR.record.publication[].$last.location[]") | ||
copy_field("$880.a", "$AGR.record.publication[].$last.location[].$append") | ||
set_array("$AGR.record.publication[].$last.publishedBy[]") | ||
copy_field("$880.b", "$AGR.record.publication[].$last.publishedBy[].$append") | ||
end | ||
end | ||
else | ||
else | ||
copy_field("[email protected]","alternateGraphicRepresentation[].$append.script.id") | ||
copy_field("[email protected]","alternateGraphicRepresentation[].$last.script.label") | ||
set_array("alternateGraphicRepresentation[].$last.publication[]") | ||
add_field ("alternateGraphicRepresentation[].$last.publication[].$append.dummi","") | ||
set_array("alternateGraphicRepresentation[].$last.publication[].$last.location[]") | ||
add_field ("alternateGraphicRepresentation[].$last.publication[].$append.dummi","") | ||
set_array("alternateGraphicRepresentation[].$last.publication[].$last.location[]") | ||
copy_field("$880.a", "alternateGraphicRepresentation[].$last.publication[].$last.location[].$append") | ||
set_array("alternateGraphicRepresentation[].$last.publication[].$last.publishedBy[]") | ||
copy_field("$880.b", "alternateGraphicRepresentation[].$last.publication[].$last.publishedBy[].$append") | ||
|
@@ -475,25 +475,25 @@ do put_macro("manufacture") | |
copy_field("$i.6","$i.linkageTest") | ||
do list(path:"880??","var":"$880") | ||
if in ("$i.linkageTest","$880.linkageTest") | ||
if in ("[email protected]","alternateGraphicRepresentation[].*.script.id") | ||
if in ("[email protected]","alternateGraphicRepresentation[].*.script.id") | ||
do list(path:"alternateGraphicRepresentation[]","var":"$AGR") | ||
if in ("[email protected]","$AGR.script.id") | ||
unless exists("$AGR.record.manufacture[]") | ||
set_array("$AGR.record.manufacture[]") | ||
end | ||
add_field ("$AGR.record.manufacture[].$append.dummi","") | ||
set_array("$AGR.record.manufacture[].$last.location[]") | ||
end | ||
add_field ("$AGR.record.manufacture[].$append.dummi","") | ||
set_array("$AGR.record.manufacture[].$last.location[]") | ||
copy_field("$880.a", "$AGR.record.manufacture[].$last.location[].$append") | ||
set_array("$AGR.record.manufacture[].$last.manufacturedBy[]") | ||
copy_field("$880.b", "$AGR.record.manufacture[].$last.manufacturedBy[].$append") | ||
end | ||
end | ||
else | ||
else | ||
copy_field("[email protected]","alternateGraphicRepresentation[].$append.script.id") | ||
copy_field("[email protected]","alternateGraphicRepresentation[].$last.script.label") | ||
set_array("alternateGraphicRepresentation[].$last.manufacture[]") | ||
add_field ("alternateGraphicRepresentation[].$last.manufacture[].$append.dummi","") | ||
set_array("alternateGraphicRepresentation[].$last.manufacture[].$last.location[]") | ||
add_field ("alternateGraphicRepresentation[].$last.manufacture[].$append.dummi","") | ||
set_array("alternateGraphicRepresentation[].$last.manufacture[].$last.location[]") | ||
copy_field("$880.a", "alternateGraphicRepresentation[].$last.manufacture[].$last.location[].$append") | ||
set_array("alternateGraphicRepresentation[].$last.manufacture[].$last.publishedBy[]") | ||
copy_field("$880.b", "alternateGraphicRepresentation[].$last.manufacture[].$last.publishedBy[].$append") | ||
|
@@ -502,4 +502,4 @@ do put_macro("manufacture") | |
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -100,7 +100,7 @@ do list(path:"500 ","var":"$i") | |
copy_field("$i.6","$i.linkageTest") | ||
do list(path:"880??","var":"$880") | ||
if in ("$i.linkageTest","$880.linkageTest") | ||
if in ("[email protected]","alternateGraphicRepresentation[].*.script.id") | ||
if in ("[email protected]","alternateGraphicRepresentation[].*.script.id") | ||
do list(path:"alternateGraphicRepresentation[]","var":"$AGR") | ||
if in ("[email protected]","$AGR.script.id") | ||
unless exists("$AGR.record.note[]") | ||
|
@@ -109,16 +109,16 @@ do list(path:"500 ","var":"$i") | |
copy_field("$880.a","$AGR.record.note[].$append") | ||
end | ||
end | ||
else | ||
else | ||
copy_field("[email protected]","alternateGraphicRepresentation[].$append.script.id") | ||
copy_field("[email protected]","alternateGraphicRepresentation[].$last.script.label") | ||
copy_field("[email protected]","alternateGraphicRepresentation[].$last.script.label") | ||
set_array("alternateGraphicRepresentation[].$last.record.note[]") | ||
copy_field("$880.a","alternateGraphicRepresentation[].$last.record.note[].$append") | ||
end | ||
end | ||
end | ||
end | ||
end | ||
end | ||
|
||
|
||
# 520 - Summary, Etc. (R) Subfield: $a (NR), $b (NR) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.