sfeed

Simple RSS and Atom feed parser
git clone https://git.sinitax.com/codemadness/sfeed
Log | Files | Refs | README | LICENSE | Upstream | sfeed.txt

sfeed.1 (2865B)


      1.Dd January 7, 2023
      2.Dt SFEED 1
      3.Os
      4.Sh NAME
      5.Nm sfeed
      6.Nd RSS and Atom parser
      7.Sh SYNOPSIS
      8.Nm
      9.Op Ar baseurl
     10.Sh DESCRIPTION
     11.Nm
     12reads RSS or Atom feed data (XML) from stdin.
     13It writes the feed data in a TAB-separated format to stdout.
     14If the
     15.Ar baseurl
     16argument is a valid absolute URL then the relative links or enclosures will be
     17made an absolute URL.
     18.Sh TAB-SEPARATED FORMAT FIELDS
     19The items are output per line in a TAB-separated format.
     20.Pp
     21For the fields title, id and author each whitespace character is replaced by a
     22SPACE character.
     23Control characters are removed.
     24.Pp
     25The content field can contain newlines and these are escaped.
     26TABs, newlines and '\e' are escaped with '\e', so it becomes: '\et', '\en'
     27and '\e\e'.
     28Other whitespace characters except spaces are removed.
     29Control characters are removed.
     30.Pp
     31The order and content of the fields are:
     32.Bl -tag -width 15n
     33.It 1. timestamp
     34UNIX timestamp in UTC+0, empty if missing or on a parse failure.
     35.It 2. title
     36Title text, HTML code in titles is ignored and is treated as plain-text.
     37.It 3. link
     38Link
     39.It 4. content
     40Content, can have plain-text or HTML code depending on the content-type field.
     41.It 5. content-type
     42"html" or "plain" if it has content.
     43.It 6. id
     44RSS item GUID or Atom id.
     45.It 7. author
     46Item, first author.
     47.It 8. enclosure
     48Item, first enclosure.
     49.It 9. category
     50Item, categories, multiple values are separated by the '|' character.
     51.El
     52.Sh EXIT STATUS
     53.Ex -std
     54.Sh EXAMPLES
     55.Bd -literal
     56curl -s 'https://codemadness.org/atom.xml' | sfeed
     57.Ed
     58.Pp
     59To convert the character set from a feed that is not UTF-8 encoded the
     60.Xr iconv 1
     61tool can be used:
     62.Bd -literal
     63curl -s 'https://codemadness.org/some_iso-8859-1_feed.xml' | \e
     64iconv -f iso-8859-1 -t utf-8 | \e
     65sfeed
     66.Ed
     67.Sh EXAMPLE SETUP
     681. Create a directory for the sfeedrc configuration and the feeds:
     69.Bd -literal
     70	mkdir -p ~/.sfeed/feeds
     71.Ed
     72.Pp
     732. Copy the example
     74.Xr sfeedrc 5
     75configuration:
     76.Bd -literal
     77	cp sfeedrc.example ~/.sfeed/sfeedrc
     78	$EDITOR ~/.sfeed/sfeedrc
     79.Ed
     80.Pp
     81Or import existing OPML subscriptions using
     82.Xr sfeed_opml_import 1 :
     83.Bd -literal
     84	sfeed_opml_import < file.opml > ~/.sfeed/sfeedrc
     85.Ed
     86.Pp
     873. To update feeds and merge the new items with existing items:
     88.Bd -literal
     89	sfeed_update
     90.Ed
     91.Pp
     924. Format feeds to a plain-text list:
     93.Bd -literal
     94	sfeed_plain ~/.sfeed/feeds/*
     95.Ed
     96.Pp
     97Or format feeds to a curses interface:
     98.Bd -literal
     99	sfeed_curses ~/.sfeed/feeds/*
    100.Ed
    101.Pp
    102There are also other formatting programs included.
    103The README file has more examples.
    104.Sh SEE ALSO
    105.Xr sfeed_curses 1 ,
    106.Xr sfeed_opml_import 1 ,
    107.Xr sfeed_plain 1 ,
    108.Xr sfeed_update 1 ,
    109.Xr sfeed 5 ,
    110.Xr sfeedrc 5
    111.Sh AUTHORS
    112.An Hiltjo Posthuma Aq Mt hiltjo@codemadness.org
    113.Sh CAVEATS
    114If a timezone for the timestamp field is not in the RFC 822 or RFC 3339 format
    115it is not supported and the timezone is interpreted as UTC+0.