schemaorg

package
v0.2.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 29, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package schemaorg converts Schema.org metadata to/from the commonmeta metadata format.

Index

Constants

This section is empty.

Variables

View Source
var CMToSOMappings = map[string]string{
	"Article":        "Article",
	"Audiovisual":    "CreativeWork",
	"Book":           "Book",
	"BookChapter":    "BookChapter",
	"Collection":     "CreativeWork",
	"Dataset":        "Dataset",
	"Dissertation":   "Dissertation",
	"Document":       "CreativeWork",
	"Entry":          "CreativeWork",
	"Event":          "CreativeWork",
	"Figure":         "CreativeWork",
	"Image":          "CreativeWork",
	"Instrument":     "Instrument",
	"JournalArticle": "ScholarlyArticle",
	"LegalDocument":  "Legislation",
	"Software":       "SoftwareSourceCode",
	"Presentation":   "PresentationDigitalDocument",
}

CMToSOMappings maps Commonmeta types to Schema.org types.

Functions

func Read added in v0.2.1

func Read(content Content) (commonmeta.Data, error)

Read reads Schema.org metadata and converts it to commonmeta.

Types

type Content

type Content struct {
	ID    string `json:"id"`
	Title string `json:"title"`
}

Content represents the Schema.org metadata.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL