sfeed.1 (2613B) - raw


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