Skip to content

Commit

Permalink
Adjust description.label and remove tableOfContents (#rpb-115)
Browse files Browse the repository at this point in the history
Delete line comment in title-to-strapi.fix
  • Loading branch information
maipet committed Feb 15, 2024
1 parent 0433ee5 commit 457276b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
7 changes: 3 additions & 4 deletions conf/output/test-output-84.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,9 @@
} ],
"description" : [ {
"id" : "http://digitale-objekte.hbz-nrw.de/storage2/2017/08/19/file_28/7343682.pdf",
"label" : "Inhaltstext"
} ],
"tableOfContents" : [ {
"label" : "http://digitale-objekte.hbz-nrw.de/stor..."
}, {
"id" : "https://www.hsozkult.de/publicationreview/id/reb-22111",
"label" : "Inhaltsverzeichnis"
"label" : "https://www.hsozkult.de/publ..."
} ]
}
18 changes: 11 additions & 7 deletions conf/rpb-titel-to-lobid.fix
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,11 @@ elsif exists ("f709")
end
replace_all("bibliographicCitation","¬","")

# fulltextOnline
# fulltextOnline and link to external description/ToC

if any_match("f90[].*.n90", "Inhaltsverzeichnis|Inhaltstext")
set_array("description[]")
end

do list(path:"f90[]", "var": "$i")
if all_equal("$i.n90", "Volltext")
Expand All @@ -333,17 +337,17 @@ do list(path:"f90[]", "var": "$i")
replace_all("fulltextOnline[].$last.label", "https://nbn-resolving.org/", "")

elsif all_equal("$i.n90", "Inhaltstext")
set_array("description[]")
copy_field("$i.f90_", "description[].$append.id")
copy_field("$i.n90", "description[].$last.label")
copy_field("$i.f90_", "description[].$last.label")

elsif all_equal("$i.n90", "Inhaltsverzeichnis")
set_array("tableOfContents[]")
copy_field("$i.f90_", "tableOfContents[].$append.id")
copy_field("$i.n90", "tableOfContents[].$last.label")
copy_field("$i.f90_", "description[].$append.id")
copy_field("$i.f90_", "description[].$last.label")
end
end

retain( "type[]", "contribution[]", "extent", "hasItem[]", "responsibilityStatement[]", "language[]", "medium[]", "subject[]", "title", "hbzId", "oclcNumber[]", "otherTitleInformation[]", "natureOfContent[]", "publication[]", "sameAs[]", "describedBy", "@context", "id", "zdbId", "spatial[]", "inCollection[]", "rpbId", "schoeneNummer", "bibliographicCitation", "isPartOf[]", "note[]", "fulltextOnline[]", "tableOfContents[]", "description[]")
replace_all("description[].*.label", "^([^\\.]+[^/]+/....).+$","$1...")

retain( "type[]", "contribution[]", "extent", "hasItem[]", "responsibilityStatement[]", "language[]", "medium[]", "subject[]", "title", "hbzId", "oclcNumber[]", "otherTitleInformation[]", "natureOfContent[]", "publication[]", "sameAs[]", "describedBy", "@context", "id", "zdbId", "spatial[]", "inCollection[]", "rpbId", "schoeneNummer", "bibliographicCitation", "isPartOf[]", "note[]", "fulltextOnline[]", "description[]")

vacuum()
1 change: 0 additions & 1 deletion conf/rpb-titel-to-strapi.fix
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ do put_macro("add_url")
if exists("$[from]")
if all_match("$[from]", "(https?|ftp):\\/\\/(\\S+\\.)+\\S+(\\/\\S*)?|")
move_field("$[from]", "f90[].$append.f90_")
#add_field("f90[].*.n90", "$[type]")
set_field("f90[].$last.n90", "$[type]")
end
end
Expand Down

0 comments on commit 457276b

Please sign in to comment.