Skip to content

Commit

Permalink
filter references in crossrefxml writer
Browse files Browse the repository at this point in the history
  • Loading branch information
mfenner committed May 16, 2024
1 parent 578c219 commit bdb11f5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion cmd/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
},
}

Expand Down
16 changes: 9 additions & 7 deletions crossrefxml/writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
})
}
}
}

Expand Down

0 comments on commit bdb11f5

Please sign in to comment.