reader

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var InitialCapture func(event *tcell.EventKey) *tcell.EventKey

Functions

This section is empty.

Types

type Reader

type Reader struct {
	Book           *epub.Epub
	Config         *config.Config
	FilePath       string
	UI             *ui.UI
	JumpList       map[rune][4]interface{} // [index, width, pos, pctg]
	CurrentChapter int                     // Current chapter index

	// Cache fields
	TempDir string // Temporary directory for image files
}

Reader represents the EPUB reader

func NewReader

func NewReader(book *epub.Epub, cfg *config.Config, filePath string) *Reader

NewReader creates a new Reader instance

func (*Reader) ResetCapture

func (r *Reader) ResetCapture()

func (*Reader) Run

func (r *Reader) Run(index int, width int, pos int, pctg float64)

Run runs the reader

func (*Reader) SetCapture

func (r *Reader) SetCapture(f func(event *tcell.EventKey) *tcell.EventKey)

Jump to

Keyboard shortcuts

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