lib

package
v0.0.5 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: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MainStyle = lipgloss.NewStyle().
				Border(lipgloss.RoundedBorder(), true).
				BorderForeground(lipgloss.Color("240")).
				Padding(0, 1).
				Margin(0)

	ReaderStyle = lipgloss.NewStyle()
)

Functions

func ConvertDate

func ConvertDate(dateString string) string

func FetchURL added in v0.0.2

func FetchURL(url string, preferCache bool) []byte

func Max added in v0.0.4

func Max(a, b int) int

func OpenURL

func OpenURL(url string) error

https://stackoverflow.com/questions/39320371/how-start-web-server-to-open-page-in-browser-in-golang openURL opens the specified URL in the default browser of the user.

func ParseUrls

func ParseUrls() []string

func RenderMarkdown added in v0.0.4

func RenderMarkdown(content string) string

func TableStyle added in v0.0.3

func TableStyle() table.Styles

func URLToDir added in v0.0.2

func URLToDir(url string) string

Types

type Feed added in v0.0.3

type Feed struct {
	Title string `json:"-"`
	URL   string `json:"URL"`
	Posts []Post `json:"posts"`
	ID    int    `json:"-"`
}

func GetContentForURL added in v0.0.2

func GetContentForURL(url string, preferCache bool) Feed

func (Feed) GetTotalUnreads added in v0.0.5

func (f Feed) GetTotalUnreads() int

type Feeds added in v0.0.2

type Feeds []Feed

func GetAllContent added in v0.0.2

func GetAllContent(preferCache bool) Feeds

go reotines am irite

func MarkRead added in v0.0.5

func MarkRead(feeds Feeds, feedID int, postID int) Feeds

func ReadAll added in v0.0.5

func ReadAll(feeds Feeds, feedID int) Feeds

func ToggleRead added in v0.0.5

func ToggleRead(feeds Feeds, feedID int, postID int) Feeds

func (Feeds) ReadTracking added in v0.0.5

func (feeds Feeds) ReadTracking() (Feeds, error)

Read from JSON file

func (Feeds) WriteTracking added in v0.0.5

func (feeds Feeds) WriteTracking() error

type Post added in v0.0.2

type Post struct {
	UUID    string `json:"uuid"`
	Title   string `json:"-"`
	Content string `json:"-"`
	Link    string `json:"-"`
	Date    string `json:"-"`
	ID      int    `json:"-"`
	Read    bool   `json:"read"`
}

func GetPosts added in v0.0.3

func GetPosts(url string) []Post

Jump to

Keyboard shortcuts

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