util

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2024 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NoPubDate time.Time = time.Date(1001, 1, 1, 1, 1, 1, 1, time.UTC)

Functions

func Exists

func Exists(path string) bool

func GetCacheFilePath

func GetCacheFilePath() (string, error)

func GetConfigFilePath

func GetConfigFilePath() (string, error)

func IsDigit

func IsDigit(input byte) bool

func IsHeadless

func IsHeadless() bool

headless detects if this is a headless machine by looking up the DISPLAY environment variable

func IsLetter

func IsLetter(input byte) bool

func IsLynxPresent

func IsLynxPresent() bool

func IsSpecialChar

func IsSpecialChar(input byte) bool

isSpecialChar returns if a given input char is a reserved char as per RFC 3986 see paragraph 2.2: https://www.ietf.org/rfc/rfc3986.txt

func LineOf added in v0.3.5

func LineOf(width int, symbol string) string

func OpenWithBrowser

func OpenWithBrowser(url string) error

openWithBrowser opens the selected article with the default browser for desktop environment. The environment variable DISPLAY is used to detect if the app is running on a headless machine. see: https://wiki.debian.org/DefaultWebBrowser

func OpenWithLynx

func OpenWithLynx(url string) error

openWithLynx opens the selected article with lynx. see: https://lynx.invisible-island.net/

func PadToLeft added in v0.3.5

func PadToLeft(s string, len int) string

func PadToRight added in v0.3.4

func PadToRight(s string, len int) string

func RenderArticleRow

func RenderArticleRow(pubDate time.Time, title string) string

func RenderFeedRow

func RenderFeedRow(unreadCount, itemsLen int, name string) string

func StripComments

func StripComments(bs []byte) []byte

Types

This section is empty.

Jump to

Keyboard shortcuts

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