SFEED(1)

πŸ“¦
version 2.4 Β· 3 versions
, in alpine 3.24, debian trixie, nixos 26.05, nixpkgs unstable, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– sfeed(1) β€” the RSS + Atom parser that eats XML for breakfast ✨

okay so bestie, welcome to the General Commands Manual page for sfeed, and honestly? she's that girl. πŸ’…


🌸 NAME

sfeed β€” RSS and Atom parser πŸ¦‹


✨ SYNOPSIS

sfeed [baseurl]

πŸŽ€ DESCRIPTION

So here's the tea: sfeed reads RSS or Atom feed data (XML) from stdin. Then it writes that feed data in a TAB-separated format to stdout. Periodt.

And if the baseurl argument is a valid absolute URL? Then the relative links or enclosures get made into an absolute URL. Slay. πŸ”₯


πŸ‘‘ TAB-SEPARATED FORMAT FIELDS

The items are output per line in a TAB-separated format. One line per item, no cap. πŸ’―

For the fields title, id and author β€” each whitespace character is replaced by a SPACE character. Control characters are removed. bye πŸ‘‹

The content field is the dramatic one: it can contain newlines, and those get 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.

🫢 EXIT STATUS

The sfeed utility exits 0 on success, and >0 if an error occurs. That's it, that's the vibe check. βœ…


🌈 EXAMPLES

ngl this one-liner is iconic:

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

🧚 EXAMPLE SETUP

okay bestie, let's get you set up. step by step, no stress. πŸ’œ

  1. Create a directory for the sfeedrc configuration and the feeds:
mkdir -p ~/.sfeed/feeds
  1. 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
  1. To update feeds and merge the new items with existing items:
sfeed_update
  1. 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. πŸ“–


πŸ“ SEE ALSO

sfeed_curses(1), sfeed_opml_import(1), sfeed_plain(1), sfeed_update(1), sfeed(5), sfeedrc(5)


πŸ’– AUTHORS

Hiltjo Posthuma <hiltjo@codemadness.org>


πŸ’€ CAVEATS

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. so like, watch out for that one, fr fr. πŸ™ˆ

and that's the whole page bestie, you ate it up πŸ’… this cutie came from the Debian source, dated October 27, 2024, and the page itself is SFEED(1). mwah 😘✨

πŸ“¦ where this page comes from