scripts/ref: fix parsing
This commit is contained in:
parent
c41f7f1eff
commit
be4fac1ac1
@ -19,10 +19,10 @@ else
|
|||||||
| ($reply.data + $reply.details) as $data
|
| ($reply.data + $reply.details) as $data
|
||||||
| [{author: $data.authors | map(.name | splitname),
|
| [{author: $data.authors | map(.name | splitname),
|
||||||
isbn: $data.identifiers.isbn_10[0],
|
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,
|
issued: $data.publish_date,
|
||||||
publisher: $data.details.publishers[0],
|
publisher: $data.details.publishers[0],
|
||||||
"publisher-place": $data.details.publish_places[0],
|
"publisher-place": $data.details | (.publish_places[0] // "Nowhere"),
|
||||||
type: "book",
|
type: "book",
|
||||||
title: $data.title,
|
title: $data.title,
|
||||||
url: ("https://www.worldcat.org/oclc/" + $oclc)}]' \
|
url: ("https://www.worldcat.org/oclc/" + $oclc)}]' \
|
||||||
|
Loading…
Reference in New Issue
Block a user