commands

package
v2.1.6 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: GPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetWslHostName

func GetWslHostName() string

Gets the subsystem host ip If the CLI is running under WSL the localhost url will not work so this function should return the real ip that we should redirect to

func IsWSL

func IsWSL() bool

func IsWayland

func IsWayland() bool

func Render

func Render(items []list.Item, cmds Commands, errors []string) error

Types

type Commands

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

func New

func New(config config.Config, store store.Store) Commands

func (Commands) Add

func (c Commands) Add(url string) error

func (Commands) CleanFeeds

func (c Commands) CleanFeeds() error

func (Commands) FindArticle

func (c Commands) FindArticle(substr string) (item store.Item, err error)

func (Commands) GetAllFeeds

func (c Commands) GetAllFeeds() ([]store.Item, error)

func (Commands) GetArticleByID

func (c Commands) GetArticleByID(ID int) (store.Item, error)

func (Commands) GetGlamourisedArticle

func (c Commands) GetGlamourisedArticle(ID int) (string, error)

func (Commands) List

func (c Commands) List(numResults int) error

func (Commands) OpenInBrowser

func (c Commands) OpenInBrowser(url string) error
func (c Commands) OpenLink(url string) error

func (Commands) TUI

func (c Commands) TUI() error

type ErrorItem added in v2.1.4

type ErrorItem struct {
	FeedURL string
	Err     error
}

type FetchResultError

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

type TUIItem

type TUIItem struct {
	ID        int
	Title     string
	FeedName  string
	URL       string
	Read      bool
	Favourite bool
}

func ItemToTUIItem

func ItemToTUIItem(i store.Item) TUIItem

func (TUIItem) FilterValue

func (i TUIItem) FilterValue() string

Jump to

Keyboard shortcuts

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