scripts/ref: fix parsing

This commit is contained in:
Michele Guerini Rocco 2023-06-07 09:09:43 +02:00
parent c41f7f1eff
commit be4fac1ac1
Signed by: rnhmjoj
GPG Key ID: BFBAF4C975F76450

View File

@ -19,10 +19,10 @@ else
| ($reply.data + $reply.details) as $data
| [{author: $data.authors | map(.name | splitname),
isbn: $data.identifiers.isbn_10[0],
edition: $data.details.edition_name | split(" ") | .[0] | sub("[a-z]+"; ""),
edition: $data.details | (.edition_name // "1") | split(" ") | .[0] | sub("[a-z]+"; ""),
issued: $data.publish_date,
publisher: $data.details.publishers[0],
"publisher-place": $data.details.publish_places[0],
"publisher-place": $data.details | (.publish_places[0] // "Nowhere"),
type: "book",
title: $data.title,
url: ("https://www.worldcat.org/oclc/" + $oclc)}]' \