Documentation
¶
Overview ¶
Package jsonfeed converts JSON Feed metadata to/from the commonmeta metadata format.
Index ¶
- func Fetch(str string) (commonmeta.Data, error)
- func FetchAll(number int, page int, community string, archived bool) ([]commonmeta.Data, error)
- func GetContributors(contrib Authors) ([]commonmeta.Contributor, error)
- func GetFundingReferences(content Content) []commonmeta.FundingReference
- func Load(filename string) (commonmeta.Data, error)
- func LoadAll(filename string) ([]commonmeta.Data, error)
- func QueryURL(number int, page int, community string, archived bool) string
- func Read(content Content) (commonmeta.Data, error)
- func ReadAll(content []Content) ([]commonmeta.Data, error)
- type Affiliation
- type Authors
- type Blog
- type Content
- type FundingReference
- type Query
- type Reference
- type Relation
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Fetch ¶ added in v0.2.14
func Fetch(str string) (commonmeta.Data, error)
Fetch fetches JSON Feed metadata and returns Commonmeta metadata.
func FetchAll ¶ added in v0.6.73
FetchAll fetches a list of JSON Feed metadata and returns Commonmeta metadata.
func GetContributors ¶ added in v0.2.14
func GetContributors(contrib Authors) ([]commonmeta.Contributor, error)
func GetFundingReferences ¶ added in v0.2.14
func GetFundingReferences(content Content) []commonmeta.FundingReference
GetFundingReferences returns the funding references from the JSON Feed metadata. Either provided by the blog metadata or via HasAward relationships
func Load ¶ added in v0.2.14
func Load(filename string) (commonmeta.Data, error)
Load loads the metadata for a single work from a JSON file
func LoadAll ¶ added in v0.2.14
func LoadAll(filename string) ([]commonmeta.Data, error)
LoadAll loads the metadata for a list of works from a JSON file and converts it to the Commonmeta format
Types ¶
type Affiliation ¶ added in v0.2.14
Affiliation represents an affiliation in the JSON Feed item.
type Authors ¶ added in v0.2.14
type Authors []struct {
Given string `json:"given"`
Family string `json:"family"`
Name string `json:"name"`
URL string `json:"url"`
Affiliation []Affiliation `json:"affiliation"`
}
Authors represents the authors in the JSON Feed item.
type Blog ¶ added in v0.2.14
type Blog struct {
ID string `json:"id"`
Category string `json:"category"`
Description string `json:"description"`
Favicon string `json:"favicon"`
Funding FundingReference `json:"funding"`
Generator string `json:"generator"`
HomePageURL string `json:"home_page_url"`
ISSN string `json:"issn"`
Language string `json:"language"`
License string `json:"license"`
Prefix string `json:"prefix"`
Slug string `json:"slug"`
Status string `json:"status"`
Title string `json:"title"`
DOIReg bool `json:"doi_reg"`
}
type Content ¶
type Content struct {
ID string `json:"id"`
DOI string `json:"doi"`
GUID string `json:"guid"`
RID string `json:"rid"`
Abstract string `json:"abstract"`
ArchiveURL string `json:"archive_url"`
Authors Authors `json:"authors"`
Blog Blog `json:"blog"`
BlogName string `json:"blog_name"`
BlogSlug string `json:"blog_slug"`
ContentHTML string `json:"content_html"`
FeatureImage string `json:"image"`
IndexedAt int64 `json:"indexed_at"`
Language string `json:"language"`
PublishedAt int64 `json:"published_at"`
Relationships []Relation `json:"relationships"`
Reference []Reference `json:"reference"`
FundingReferences []FundingReference `json:"funding_references"`
Summary string `json:"summary"`
Tags []string `json:"tags"`
Title string `json:"title"`
UpdatedAt int64 `json:"updated_at"`
URL string `json:"url"`
Version string `json:"version"`
}
Content represents the JSON Feed metadata.
type FundingReference ¶ added in v0.13.0
type FundingReference struct {
FunderIdentifier string `json:"funderIdentifier,omitempty"`
FunderIdentifierType string `json:"funderIdentifierType,omitempty"`
FunderName string `json:"funderName,omitempty"`
AwardNumber string `json:"awardNumber,omitempty"`
AwardTitle string `json:"awardTitle,omitempty"`
AwardURI string `json:"awardUri,omitempty"`
}
FundingReference represents the funding reference of a publication, defined in the commonmeta JSON Schema.