format

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RAW = iota
	CBZ
	EPUB
	KEPUB
)

Variables

This section is empty.

Functions

func SaveAsCBZ

func SaveAsCBZ(pages []Page, outFile string) error

func SaveAsEPUB

func SaveAsEPUB(theBook *book.Book, pages []Page, outFile string) error

func SaveAsKEPUB

func SaveAsKEPUB(theBook *book.Book, pages []Page, outFile string) error

func SaveAsRaw

func SaveAsRaw(pages []Page, outDir string) error

Types

type EpubBook

type EpubBook struct {
	BookID           string // urn:uuid:....
	Language         string
	Title            string
	TotalPageCount   int
	IsRTL            bool
	Contributor      string
	Creator          string
	ModifiedDatetime string
	Cover            EpubPageItem
	Pages            []EpubPage
}

type EpubPage

type EpubPage struct {
	Title   string
	BgColor string
	Width   uint
	Height  uint
	SrcFile string
	Xhtml   EpubPageItem
	Image   EpubPageItem
}

type EpubPageItem

type EpubPageItem struct {
	Id        string
	Url       string
	MediaType string
}

type OutputFormat

type OutputFormat int

func (OutputFormat) Ext

func (f OutputFormat) Ext() string

func (*OutputFormat) Set

func (f *OutputFormat) Set(val string) error

func (OutputFormat) String

func (f OutputFormat) String() string

type Page

type Page struct {
	Id        string
	Filepath  string
	MediaType string
	Size      book.Size
}

Jump to

Keyboard shortcuts

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