simple utility for formatting (groups of) feeds
You can supply your own golang template with the -templateOverride
parameter.
When defining your own template, there are several template variables at your disposal:
Field | Description |
---|---|
.Now |
Get current time (machine dependent) |
.NowIn (loc) |
Get current time in desired location |
.Org |
The organization / blog name / title |
.Feeds |
An array of entries you can perform a range over |
Within a feed object you have
Field | Description |
---|---|
.Parent |
A reference back to the feed group |
.Article |
Article name, title of the post |
.Link |
URL to the source |
.Published |
last touched time, latest time between published and updated time |
The goal has been to keep the feed file simple. At a minimum, you can just provide a list of feeds delimited by new-lines and you are done. To naturally give some more metadata per feed, the cli recognizes the following format
Then the grammar looks like:
<feedFile> ::= <line> || <line>\n
<line> ::= <feed> || <comment>> || ""
<comment> ::= # <string>
<feed> ::= <feedLink> <metadata>
<feedLink> ::= <url>
<metadata> ::= <key>=<value> <metadata> || ""
<key> ::= <string>
<value> ::= <string>
By default, urls passed as feedLinks
are interpreted as typical xml feed (rss, atom).
Scheme | Feature | Additional Configuration |
---|---|---|
(default) http:// |
parse rss/atom feed |
none |
twitter://<handle> |
parse twitter timeline |
define environment variables: TWITTER_CONSUMER_KEY, TWITTER_CONSUMER_SECRET |
youtube_user://<@username> |
parse youtube channel |
none |
https://nullprogram.com/feed/ daysOld=30
https://xkcd.com/atom.xml
https://blog.codinghorror.com/rss/
twitter://@dev_humor
Key | Description |
---|---|
daysOld |
positive number to indicate number of days old to respect this feed |
limit |
positive number to indicate a limit to the number of entries to pull for a feed |
timeout |
positive number to indicate number of seconds to use as timeout to fetch a feed |
nameOverride |
string to override the blog title variable in the template data |