From 7a98d6d6bc7ee134dce736d2700233a315f56ea4 Mon Sep 17 00:00:00 2001 From: Martin Czygan Date: Sat, 10 Jul 2021 03:21:57 +0200 Subject: schema: render isbn as well --- skate/schema.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'skate') 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() } -- cgit v1.2.3