Skip to content

Commit 659c8ec

Browse files
committed
fix: improve jq conversion logic and update dependencies
1 parent 2f3ae2b commit 659c8ec

1 file changed

Lines changed: 11 additions & 7 deletions

File tree

middleware/scripts/publiso_conversor.jq

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
"@id":
77
(if has("doi")
88
then "https://doi.org/" + .doi
9-
else "https://repository.publisso.de/resource/" + .["@id"]
9+
elif has("@id")
10+
then "https://repository.publisso.de/resource/" + .["@id"]
11+
else null
1012
end),
1113
"name": (if has("title") then (.title[]) else null end),
1214
"alternativeHeadline": (if has("alternative") then .alternative[0] else null end),
@@ -20,12 +22,14 @@
2022
"url": ("https://doi.org/" + .doi)
2123
}
2224
else empty end),
23-
{
24-
"@type": "PropertyValue",
25-
"propertyID": "frl-internal",
26-
"value": .["@id"],
27-
"url": ("https://repository.publisso.de/resource/" + .["@id"])
28-
}
25+
(if has("@id") then
26+
{
27+
"@type": "PropertyValue",
28+
"propertyID": "frl-internal",
29+
"value": .["@id"],
30+
"url": ("https://repository.publisso.de/resource/" + .["@id"])
31+
}
32+
else empty end)
2933
]),
3034

3135
"creator":

0 commit comments

Comments
 (0)