diff --git a/scripts/ref b/scripts/ref index bdaa471..4373b3d 100755 --- a/scripts/ref +++ b/scripts/ref @@ -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)}]' \