diff options
author | Martin Czygan <martin.czygan@gmail.com> | 2021-07-10 03:21:57 +0200 |
---|---|---|
committer | Martin Czygan <martin.czygan@gmail.com> | 2021-07-10 03:21:57 +0200 |
commit | 7a98d6d6bc7ee134dce736d2700233a315f56ea4 (patch) | |
tree | 30eb371519dbd72a3a6584418d056365dcaf7db6 /skate | |
parent | 778b0300de74637874881bbd107d9d8e4d4d127d (diff) | |
download | refcat-7a98d6d6bc7ee134dce736d2700233a315f56ea4.tar.gz refcat-7a98d6d6bc7ee134dce736d2700233a315f56ea4.zip |
schema: render isbn as well
Diffstat (limited to 'skate')
-rw-r--r-- | skate/schema.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/skate/schema.go b/skate/schema.go index 23a54b9..2d90735 100644 --- a/skate/schema.go +++ b/skate/schema.go @@ -180,11 +180,17 @@ func ReleaseToUnstructured(r *Release) string { } fmt.Fprintf(&buf, `%s`, r.Publisher) } - if r.ExtIDs.DOI != "" { + switch { + case r.ExtIDs.DOI != "": if buf.Len() > 0 { fmt.Fprintf(&buf, ", ") } fmt.Fprintf(&buf, `%s`, r.ExtIDs.DOI) + case len(r.ExtIDs.ISBN) > 0: + if buf.Len() > 0 { + fmt.Fprintf(&buf, ", ") + } + fmt.Fprintf(&buf, `%s`, r.ExtIDs.ISBN[0]) } return buf.String() } |