===== ragg: rss feed aggregation ===============================================
ragg is a silly little RSS tool I wrote to support a unified news/blog/friends
feed on my website. It takes in RSS feeds from https/file sources, merges
them into one big feed with a defined template and ordered items (most recent
first) and returns the result as a string.
===== usage ====================================================================
install using: go get jnichols.info/git/ragg.git
additional dependencies (automatically installed) are located in the go.mod
file.
aggregate your feed by doing the following:
a := &ragg.Aggregator{
Cache: ragg.Cache(ragg.D_CACHE_DIR, ragg.D_CACHE_TTL),
Sources: []string{...},
Template: &feeds.Feed{
Title: "Test Feed",
...
},
}
feed, err := a.Aggregate()
===== sources ==================================================================
sources must be either file://[path] or https://[path] for local and networked
RSS respectively. ragg doesn't currently validate or fix problems, so vet your
sources.
===== cacheing =================================================================
setting a Cache on an aggregator will store a cache file at the target location
and serve that file as long as the TTL hasn't expired and the file exists. If
the cache becomes stale or there's an error fetching the cached feed, the cache
will be invalidated and source will be re-fetched. nil caches are permitted
and will just result in feeds not being cached.
===== credits ==================================================================
thing copyright license
mmcdole/gofeed (c) 2016 mmcdole MIT
gorilla/feed (c) 2023 The Gorilla Authors BSD-3