GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
SFEED(1) FreeBSD General Commands Manual SFEED(1)

sfeedRSS 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:

1. timestamp
UNIX timestamp in UTC+0, empty if missing or on a parse failure.
2. title
Title text, HTML code in titles is ignored and is treated as plain-text.
3. link
Link
4. content
Content, can have plain-text or HTML code depending on the content-type field.
5. content-type
"html" or "plain" if it has content.
6. id
RSS item GUID or Atom id.
7. author
Item, first author.
8. enclosure
Item, first enclosure.
9. category
Item, categories, multiple values are separated by the '|' character.

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.

October 27, 2024 FreeBSD 14.3-RELEASE

Search for    or go to Top of page |  Section 1 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.