package
Version:
v0.0.0-...-25ebc1e
Opens a new window with list of versions in this module.
Published: May 31, 2022
License: BSD-3-Clause
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
type Item struct {
ID string `xml:"id,attr"`
Href string `xml:"href,attr"`
MediaType string `xml:"media-type,attr"`
Properties string `xml:"properties,attr"`
}
Item is the manifest item structure
type Manifest struct {
XMLName xml.Name
Items []Item `xml:"http://www.idpf.org/2007/opf item"`
}
Manifest is the package manifest structure
ItemWithPath looks for the manifest item corresponding to a given path
type Meta struct {
Name string `xml:"name,attr"`
Content string `xml:"content,attr"`
}
Meta is the metadata item structure
type Metadata struct {
Author string `json:"author" xml:"http://purl.org/dc/elements/1.1/ creator"`
Title string `json:"title" xml:"http://purl.org/dc/elements/1.1/ title"`
Isbn string `json:"isbn" xml:"http://purl.org/dc/elements/1.1/ identifier"`
Metas []Meta `xml:"http://www.idpf.org/2007/opf meta"`
Cover string `json:"cover"`
}
Metadata is the package metadata structure
type Package struct {
BasePath string `xml:"-"`
Metadata Metadata `xml:"http://www.idpf.org/2007/opf metadata"`
Manifest Manifest `xml:"http://www.idpf.org/2007/opf manifest"`
}
Package is the main opf structure
Parse parses the opf xml struct and returns a Package object
Source Files
¶
Click to show internal directories.
Click to hide internal directories.