ebooks

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PDF = "pdf"

	EPUB         = "epub"
	EpubMimeType = "epub+zip"

	MOBI         = "mobi"
	MobiMimeType = "x-mobipocket-ebook"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Epub

type Epub struct {
	// contains filtered or unexported fields
}

Epub struct implements the File and Document interface from the file package.

func NewEpub

func NewEpub(filename string) Epub

func (Epub) ConvertTo

func (e Epub) ConvertTo(fileType, subtype string, file io.Reader) (io.Reader, error)

func (Epub) EbookType

func (e Epub) EbookType() string

EbookType returns the Ebook type which is Epub in this case.

func (Epub) SupportedFormats

func (e Epub) SupportedFormats() map[string][]string

SupportedFormats returns a map witht the compatible formats that Pdf is compatible to be converted to.

func (Epub) SupportedMIMETypes

func (e Epub) SupportedMIMETypes() map[string][]string

SupportedMIMETypes returns a map witht the compatible MIME types that Pdf is compatible to be converted to.

type Mobi

type Mobi struct {
	// contains filtered or unexported fields
}

func NewMobi

func NewMobi(filename string) Mobi

func (Mobi) ConvertTo

func (m Mobi) ConvertTo(fileType, subtype string, file io.Reader) (io.Reader, error)

func (Mobi) EbookType

func (m Mobi) EbookType() string

EbookType returns the Ebook type which is MOBI in this case.

func (Mobi) SupportedFormats

func (m Mobi) SupportedFormats() map[string][]string

SupportedFormats returns a map witht the compatible formats that MOBI is compatible to be converted to.

func (Mobi) SupportedMIMETypes

func (m Mobi) SupportedMIMETypes() map[string][]string

SupportedMIMETypes returns a map witht the compatible MIME types that MOBI is compatible to be converted to.

Jump to

Keyboard shortcuts

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