Documentation ¶
Index ¶
- type Author
- type Container
- type Content
- type Date
- type Epub
- func (e *Epub) Check() (bool, error)
- func (e *Epub) GetHash() error
- func (e *Epub) GetOnlineMetadata(showDiff bool, forbiddenTags []string, tagAliases map[string][]string) error
- func (e *Epub) LoadMetadata(file string) error
- func (e *Epub) Parse() error
- func (e *Epub) ReadMetadata(askForISBN, useFirstISBN bool) error
- func (e *Epub) SaveMetadata() error
- func (e *Epub) SaveMetadataTo(filename string) error
- func (e *Epub) ShowInfo(fields ...string) string
- type Identifier
- type Manifest
- type MetaField
- type Metadata
- type NavPoint
- type Ncx
- type Opf
- type Rootfile
- type Spine
- type SpineItem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Author ¶
type Author struct { Data string `xml:",chardata" ` FileAs string `xml:"file-as,attr" ` Role string `xml:"role,attr" ` }
Author author
type Container ¶
type Container struct {
Rootfile Rootfile `xml:"rootfiles>rootfile" `
}
Container META-INF/container.xml file
type Epub ¶
type Epub struct { Path string Ncx Ncx Opf Opf Container Container Mimetype string Hash string Metadata *ebook.Metadata // contains filtered or unexported fields }
Epub book metadata
func NewWithGoodReads ¶ added in v0.10.0
func (*Epub) GetOnlineMetadata ¶ added in v0.13.0
func (*Epub) LoadMetadata ¶ added in v0.13.0
func (*Epub) ReadMetadata ¶ added in v0.13.0
func (*Epub) SaveMetadata ¶ added in v0.13.0
func (*Epub) SaveMetadataTo ¶ added in v0.13.0
type Identifier ¶
type Identifier struct { Data string `xml:",chardata" ` ID string `xml:"id,attr"` Scheme string `xml:"scheme,attr"` }
Identifier identifier
type Manifest ¶
type Manifest struct { ID string `xml:"id,attr" ` Href string `xml:"href,attr" ` MediaType string `xml:"media-type,attr" ` Fallback string `xml:"media-fallback,attr" ` Properties string `xml:"properties,attr" ` MediaOverlay string `xml:"media-overlay,attr" ` }
Manifest manifest
type MetaField ¶
type MetaField struct { Data string `xml:",chardata" ` Name string `xml:"name,attr" ` Content string `xml:"content,attr" ` ID string `xml:"id,attr" ` Property string `xml:"property,attr" ` }
MetaField metafield
type Metadata ¶
type Metadata struct { Title []string `xml:"title"` Language []string `xml:"language"` Identifier []Identifier `xml:"identifier"` Creator []Author `xml:"creator" ` Subject []string `xml:"subject"` Description []string `xml:"description"` Publisher []string `xml:"publisher"` Contributor []Author `xml:"contributor" ` Date []Date `xml:"date" ` Type []string `xml:"type"` Format []string `xml:"format" ` Source []string `xml:"source" ` Relation []string `xml:"relation" ` Coverage []string `xml:"coverage"` Rights []string `xml:"rights" ` Meta []MetaField `xml:"meta" ` }
Metadata metadata
type Opf ¶
type Opf struct { Metadata Metadata `xml:"metadata"` Manifest []Manifest `xml:"manifest>item"` Spine Spine `xml:"spine"` }
Opf content.opf
Click to show internal directories.
Click to hide internal directories.