epub

package
v0.0.0-...-1095124 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Epub

type Epub struct {
	Filename string

	Slug string

	Title      string
	Creator    []string
	Language   string
	Date       string
	Publisher  string
	Serie      string
	Identifier []string
	// contains filtered or unexported fields
}

func Open

func Open(filename string) (*Epub, error)

func (*Epub) GetCover

func (e *Epub) GetCover() ([]byte, string, error)

type Package

type Package struct {
	XMLName  xml.Name `xml:"package"`
	Metadata struct {
		XMLName    xml.Name `xml:"metadata"`
		Title      string   `xml:"title"`
		Creator    []string `xml:"creator"`
		Language   string   `xml:"language"`
		Date       string   `xml:"date"`
		Publisher  string   `xml:"publisher"`
		Identifier []string `xml:"identifier"`
		Meta       []struct {
			Property string `xml:"property,attr"`
			Content  string `xml:",chardata"`
		} `xml:"meta"`
	}
	Manifest struct {
		XMLName xml.Name `xml:"manifest"`
		Item    []struct {
			ID    string `xml:"id,attr"`
			Href  string `xml:"href,attr"`
			Media string `xml:"media-type,attr"`
		} `xml:"item"`
	}
}

Jump to

Keyboard shortcuts

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