SFEED(1) | General Commands Manual | SFEED(1) |
sfeed
— RSS and
Atom parser
sfeed |
[baseurl] |
sfeed
reads RSS or Atom feed data (XML)
from stdin. It writes the feed data in a TAB-separated format to stdout. If
the baseurl argument is a valid absolute URL then the
relative links or enclosures will be made an absolute URL.
The items are output per line in a TAB-separated format.
For the fields title, id and author each whitespace character is replaced by a SPACE character. Control characters are removed.
The content field can contain newlines and these are escaped. TABs, newlines and '\' are escaped with '\', so it becomes: '\t', '\n' and '\\'. Other whitespace characters except spaces are removed. Control characters are removed.
The order and content of the fields are:
The sfeed
utility exits 0 on
success, and >0 if an error occurs.
curl -s 'https://codemadness.org/atom.xml' | sfeed
To convert the character set from a feed that is not UTF-8 encoded the iconv(1) tool can be used:
curl -s 'https://codemadness.org/some_iso-8859-1_feed.xml' | \ iconv -f iso-8859-1 -t utf-8 | \ sfeed
1. Create a directory for the sfeedrc configuration and the feeds:
mkdir -p ~/.sfeed/feeds
2. Copy the example sfeedrc(5) configuration:
cp sfeedrc.example ~/.sfeed/sfeedrc $EDITOR ~/.sfeed/sfeedrc
Or import existing OPML subscriptions using sfeed_opml_import(1):
sfeed_opml_import < file.opml > ~/.sfeed/sfeedrc
3. To update feeds and merge the new items with existing items:
sfeed_update
4. Format feeds to a plain-text list:
sfeed_plain ~/.sfeed/feeds/*
Or format feeds to a curses interface:
sfeed_curses ~/.sfeed/feeds/*
There are also other formatting programs included. The README file has more examples.
sfeed_curses(1), sfeed_opml_import(1), sfeed_plain(1), sfeed_update(1), sfeed(5), sfeedrc(5)
Hiltjo Posthuma <hiltjo@codemadness.org>
If a timezone for the timestamp field is not in the RFC 822 or RFC 3339 format it is not supported and the timezone is interpreted as UTC+0.
January 7, 2023 | Debian |