picofeed

package module
v0.0.0-...-23aa4c0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2021 License: BSD-3-Clause Imports: 15 Imported by: 0

README

Picofeed

Go Reference

Picofeed is a minimal terminal rss reader. It takes feed urls direct or files of newline separated urls. It fetches all feeds on demand, and displays them.

Things you don't need with picofeed:

  • An account
  • A subscription
  • Any state at all

Honestly it's like a fancy rss curl.

Examples:
    picofeed feeds.txt --web
    picofeed http://seenaburns.com/feed.xml
    picofeed http://seenaburns.com/feed.xml feeds.txt http://example.com/feed.xml
# Use whatever click to open your terminal supports, like cmd+double click in OSX's Terminal.app
./picofeed feeds.txt

picofeed terminal rss

# Open in browser with clickable links (wow!)
./picofeed feeds.txt --web

picofeed local browser rss

Install

From source, with go 1.11 just run go build

Or there are precompiled binaries in the releases page

Other

Picofeed is built on top of gofeed

Documentation

Index

Constants

View Source
const (
	FETCH_TIMEOUT = 10 * time.Second
	DATE_FORMAT   = "Jan 2006"
)

Variables

This section is empty.

Functions

func Render

func Render(f io.Writer, posts []*Post)

func RenderHTML

func RenderHTML(f io.Writer, posts []*Post)

RenderHTML writes HTML output of the feed to f

Types

type ByTimestamp

type ByTimestamp struct{ Posts }

func (ByTimestamp) Less

func (posts ByTimestamp) Less(i, j int) bool

type Fetcher

type Fetcher struct {
	Validate  bool
	UserAgent string
}

func (*Fetcher) FetchAll

func (fe *Fetcher) FetchAll(ctx context.Context, feeds []*url.URL) ([]*Post, error)

Fetch list of feeds in parallel, aggregate results

type Post

type Post struct {
	Title     string
	Link      string
	Timestamp *time.Time
	FeedLink  string
	FeedTitle string
}

type Posts

type Posts []*Post

func (Posts) Len

func (posts Posts) Len() int

func (Posts) Swap

func (posts Posts) Swap(i, j int)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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