aboutsummaryrefslogtreecommitdiffstats
path: root/skate/schema.go
diff options
context:
space:
mode:
Diffstat (limited to 'skate/schema.go')
-rw-r--r--skate/schema.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/skate/schema.go b/skate/schema.go
index 93c9680..d6b4ded 100644
--- a/skate/schema.go
+++ b/skate/schema.go
@@ -94,7 +94,7 @@ func RefToRelease(ref *Ref) (*Release, error) {
release.Ident = ref.ReleaseIdent
release.WorkID = ref.WorkIdent
release.ExtIDs.Arxiv = b.ArxivId
- release.ExtIDs.DOI = b.DOI
+ release.ExtIDs.DOI = SanitizeDOI(b.DOI)
release.ExtIDs.PMID = b.PMID
release.ExtIDs.PMCID = b.PMCID
release.Title = b.Title
@@ -431,7 +431,7 @@ type BiblioRef struct {
// https://github.com/citation-style-language/schema,
// https://navneethg.github.io/jsonschemaviewer/. This is a subset only.
type CSL struct {
- Accessed CSLDate `json:"accessed,omitempty"`
+ Accessed *CSLDate `json:"accessed,omitempty"`
Author []CSLAuthor `json:"author,omitempty"`
CollectionTitle string `json:"collection-title,omitempty"`
ContainerTitle string `json:"container-title,omitempty"`
@@ -441,7 +441,7 @@ type CSL struct {
ISBN string `json:"ISBN,omitempty"`
ISSN string `json:"ISSN,omitempty"`
Issue string `json:"issue,omitempty"`
- Issued CSLDate `json:"issued,omitempty"`
+ Issued *CSLDate `json:"issued,omitempty"`
JournalAbbreviation string `json:"journalAbbreviation,omitempty"`
Language string `json:"language,omitempty"`
NumberOfPages string `json:"number-of-pages,omitempty"`
@@ -481,12 +481,12 @@ type CSLDate struct {
// family element. Institutional names may be delivered in the same way, but it
// is preferred to set them instead as a literal element.
//
-// We include Name, for holding unparsed name, which is not a literal.
+// We include RawName, for holding unparsed name, which is not a literal.
type CSLAuthor struct {
Family string `json:"family,omitempty"`
Given string `json:"given,omitempty"`
Literal string `json:"literal,omitempty"`
- Name string `json:"name,omitempty"`
+ RawName string `json:"raw_name,omitempty"`
}
func (b *BiblioRef) Reset() {
@@ -616,7 +616,7 @@ func (c *MinimalCitations) ParseIDList() (result IDList) {
case "ISBN":
result.ISBN = pair[1]
case "DOI":
- result.DOI = pair[1]
+ result.DOI = SanitizeDOI(pair[1])
case "PMID":
result.PMID = pair[1]
case "ISSN":