diff --git a/cmd/version.go b/cmd/version.go index 78d94d7..74c6af0 100644 --- a/cmd/version.go +++ b/cmd/version.go @@ -13,7 +13,7 @@ var versionCmd = &cobra.Command{ Short: "Print the version number of commonmeta", Long: `All software has versions. This is commonmeta's`, Run: func(cmd *cobra.Command, args []string) { - cmd.Println("Commonmeta v0.3.16 -- HEAD") + cmd.Println("Commonmeta v0.3.17 -- HEAD") }, } diff --git a/crossrefxml/writer.go b/crossrefxml/writer.go index e7a6940..88deea5 100644 --- a/crossrefxml/writer.go +++ b/crossrefxml/writer.go @@ -310,13 +310,15 @@ func Convert(data commonmeta.Data) (Body, error) { Text: d, } } - citationList.Citation = append(citationList.Citation, Citation{ - Key: v.Key, - DOI: &doi, - ArticleTitle: v.Title, - CYear: v.PublicationYear, - UnstructedCitation: v.Unstructured, - }) + if d != "" || v.Unstructured == "" { + citationList.Citation = append(citationList.Citation, Citation{ + Key: v.Key, + DOI: &doi, + ArticleTitle: v.Title, + CYear: v.PublicationYear, + UnstructedCitation: v.Unstructured, + }) + } } }