epub

package
v0.0.0-...-3ac63f7 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CONTAINER = "META-INF/container.xml"
)

Variables

View Source
var (
	ErrNotValidEpub = errors.New("not valid epub file")
	ErrNoRootFiles  = errors.New("no root files found")
	ErrNoCovers     = errors.New("no cover files found")
)

Functions

func ExtractCoverFile

func ExtractCoverFile(path string) (io.ReadCloser, error)

Types

type Epub

type Epub struct {
	*zip.Reader
	Version int

	// rel path from EPUB root
	RootFile  string
	CoverFile string
	// contains filtered or unexported fields
}

func New

func New(path string) (*Epub, error)

func NewFromReader

func NewFromReader(r multipart.File, fileSize int64) (*Epub, error)

func (*Epub) ToBook

func (e *Epub) ToBook() *dusk.Book

Jump to

Keyboard shortcuts

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