plnt

package module
v0.0.0-...-5bd1be1 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

README

Overview

plnt is an RSS feed aggregator.

plnt is configured via a TOML file (located at /etc/plnt.toml by default) and spits out an HTML and ATOM feed.

Caching

A representation of each feed is persisted to the cache directory whenever the feed is accessed. Subsequent requests set the If-Modified-Since HTTP header and will load the feed from cache if it has not changed on the server, or if the server is unreachable (so that brief unavailability will not cause spurious changes in the output).

For quick development cycles, you can use the -force_from_cache command line flag to skip any network access.

It is safe to delete files (individually or all at once) from the cache directory to force an update.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Aggregator

type Aggregator struct {
	Feeds []FeedConfig

	ForceFromCache bool // force loading all files from cache for rapid development
}

func (*Aggregator) Fetch

func (a *Aggregator) Fetch(ctx context.Context) ([]*Feed, []Item, error)

type Feed

type Feed struct {
	Title string
	Link  string
	Items []Item
}

type FeedConfig

type FeedConfig struct {
	ShortName string // used in the state directory name, e.g. “sur5r-blog”
	Title     string `toml:"title"` // human-readable, e.g. “sur5r’s Hardware Blog”
	URL       string `toml:"url"`
}

type Item

type Item struct {
	gofeed.Item

	FeedTitle string
	FeedLink  string
}

Directories

Path Synopsis
cmd
internal
f2f
Package f2f converts from the gofeed parser types to the gorilla/feeds types.
Package f2f converts from the gofeed parser types to the gorilla/feeds types.

Jump to

Keyboard shortcuts

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