lib

package
v0.0.0-...-e70626f Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2021 License: GPL-3.0, GPL-3.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Article

type Article struct {
	*readability.Article
	Link     string
	TopImage image.Image
}

type Callbacks

type Callbacks interface {
	Redraw()
	State() states.Enum
	ArticleChanged(*Article)
}

type Card

type Card struct {
	Item      *gofeed.Item
	ItemImage image.Image
	Feed      *gofeed.Feed
	FeedImage image.Image
	Article   *readability.Article
	Media     *media.Media
	// contains filtered or unexported fields
}

func (*Card) DownloadImage

func (card *Card) DownloadImage()
func (card *Card) DownloadLink()

func (*Card) DownloadMedia

func (card *Card) DownloadMedia()

func (*Card) GetMedia

func (card *Card) GetMedia() (*media.Media, error)

func (*Card) OpenArticle

func (card *Card) OpenArticle()

func (*Card) OpenBrowser

func (card *Card) OpenBrowser()

func (*Card) RunMedia

func (card *Card) RunMedia()

func (*Card) SaveImage

func (card *Card) SaveImage() func(image.Image)

type Cards

type Cards []*Card

func (Cards) Len

func (cards Cards) Len() int

func (Cards) Less

func (cards Cards) Less(i, k int) bool

func (Cards) Swap

func (cards Cards) Swap(i, k int)

type ImgDownloader

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

func (*ImgDownloader) Download

func (d *ImgDownloader) Download(url string, callback func(image.Image))

func (*ImgDownloader) GetImg

func (d *ImgDownloader) GetImg(url string) (image.Image, bool)

type Option

type Option func(*Photon)

func WithDownloadPath

func WithDownloadPath(downloadPath string) Option

func WithHTTPClient

func WithHTTPClient(c *http.Client) Option

func WithMediaExtractor

func WithMediaExtractor(extractor string) Option

func WithMediaImageCmd

func WithMediaImageCmd(imageCmd string) Option

func WithMediaTorrentCmd

func WithMediaTorrentCmd(torrentCmd string) Option

func WithMediaVideoCmd

func WithMediaVideoCmd(videoCmd string) Option

type Photon

type Photon struct {
	ImgDownloader *ImgDownloader

	KeyBindings *keybindings.Registry

	Cards           Cards
	VisibleCards    Cards
	SelectedCard    *Card
	SelectedCardPos image.Point

	OpenedArticle *Article
	// contains filtered or unexported fields
}

func New

func New(cb Callbacks, paths []string, options ...Option) (*Photon, error)

func (*Photon) RefreshFeed

func (p *Photon) RefreshFeed()

func (*Photon) SearchQuery

func (p *Photon) SearchQuery(q string)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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