[dev] sfeed: RSS/Atom parser and reader

From: Hiltjo Posthuma <hiltjo_AT_codemadness.org>
Date: Fri, 11 Feb 2022 14:54:24 +0100


I would like to share my project I've been using and tweaking over the years:

sfeed is a RSS and Atom parser (and it has some format programs).

It converts RSS or Atom feeds from XML to a TAB-separated file. There are
formatting programs included to convert this TAB-separated format to various
other formats. There are also some programs and scripts included to import and
export OPML and to fetch, filter, merge and order feed items.

The README file has some examples of some of the functionality which other
programs offer like newsboat/snownews, rss2email, rsstail. Instructions on how
to use it are also described in the README or the sfeed man pages, like:

        man sfeed

One brief example, to stream a single feed into a curses UI:

        curl https://codemadness.org/atom_content.xml | sfeed | sfeed_curses

Another example uses the formatting tool sfeed_plain to convert to a plain-text
listing and uses the dmenu vertical menu to open a link in a browser:

        url=$(curl -s gopher://codemadness.org/0/atom.xml | \
                sfeed | sfeed_plain | \
                dmenu -l 35 -i | \
                sed -n 's_AT_^.* \([a-zA-Z]*://\)\(.*\)$_AT_\1\2_AT_p')
        test -n "${url}" && $BROWSER "${url}"

Screenshot: https://codemadness.org/downloads/screenshots/sfeed-screenshot.png

Multiple feeds can be synced with the included shellscript sfeed_update and the
multiple TAB-separated feed files can then be opened as file arguments with the
format programs. Some formatting programs will then show a sidebar or an index
of the feeds.

For example:
        sfeed_curses ~/.sfeed/feeds/*

Screenshot: https://codemadness.org/downloads/screenshots/sfeed_curses_screenshot.png

By default sfeed_curses uses xdg-open to open links and the lynx browser to
convert HTML content to plain-text and pipe it to the pager.

sfeed is written in C (and some shellscripts and awk code) and has few

The program can be found at:

  * Git: git://git.codemadness.org/sfeed

  * Git browsing:
    * https://git.codemadness.org/sfeed/file/README.html
    * gopher://codemadness.org/1/git/sfeed/file/README.gph

  * Release tarballs, currently the latest version is 1.2:
    * https://codemadness.org/releases/sfeed/
    * gopher://codemadness.org/1/releases/sfeed/

  * Atom feed for releases: https://git.codemadness.org/sfeed/tags.xml

  * Writings:
    * https://codemadness.org/sfeed.html
    * gopher://codemadness.org/1/phlog/sfeed
    * Curses UI with some screenshots.
      * https://codemadness.org/sfeed_curses.html
      * gopher://codemadness.org/1/phlog/sfeed_curses

I hope it is useful to others as it is useful to me and would like to thank all
the people that have given helpful feedback and patches already.

Kind regards,
Received on Fri Feb 11 2022 - 14:54:24 CET

This archive was generated by hypermail 2.3.0 : Fri Feb 11 2022 - 15:00:10 CET