epub

package
v0.0.0-...-f377bbc Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2024 License: MIT Imports: 16 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