add sfeed.1 - www.codemadness.org - www.codemadness.org saait content files
(HTM) git clone git://git.codemadness.org/www.codemadness.org
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit bad5e2be6c8380de20838988fa999c44db120c7d
(DIR) parent 38f8d41d51b903d15410a7668eb7819abe31b995
(HTM) Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sun, 7 May 2023 11:39:50 +0200
add sfeed.1
Diffstat:
A sfeed.1 | 115 +++++++++++++++++++++++++++++++
1 file changed, 115 insertions(+), 0 deletions(-)
---
(DIR) diff --git a/sfeed.1 b/sfeed.1
@@ -0,0 +1,115 @@
+.Dd January 7, 2023
+.Dt SFEED 1
+.Os
+.Sh NAME
+.Nm sfeed
+.Nd RSS and Atom parser
+.Sh SYNOPSIS
+.Nm
+.Op Ar baseurl
+.Sh DESCRIPTION
+.Nm
+reads RSS or Atom feed data (XML) from stdin.
+It writes the feed data in a TAB-separated format to stdout.
+If the
+.Ar baseurl
+argument is a valid absolute URL then the relative links or enclosures will be
+made an absolute URL.
+.Sh TAB-SEPARATED FORMAT FIELDS
+The items are output per line in a TAB-separated format.
+.Pp
+For the fields title, id and author each whitespace character is replaced by a
+SPACE character.
+Control characters are removed.
+.Pp
+The content field can contain newlines and these are escaped.
+TABs, newlines and '\e' are escaped with '\e', so it becomes: '\et', '\en'
+and '\e\e'.
+Other whitespace characters except spaces are removed.
+Control characters are removed.
+.Pp
+The order and content of the fields are:
+.Bl -tag -width 15n
+.It 1. timestamp
+UNIX timestamp in UTC+0, empty if missing or on a parse failure.
+.It 2. title
+Title text, HTML code in titles is ignored and is treated as plain-text.
+.It 3. link
+Link
+.It 4. content
+Content, can have plain-text or HTML code depending on the content-type field.
+.It 5. content-type
+"html" or "plain" if it has content.
+.It 6. id
+RSS item GUID or Atom id.
+.It 7. author
+Item, first author.
+.It 8. enclosure
+Item, first enclosure.
+.It 9. category
+Item, categories, multiple values are separated by the '|' character.
+.El
+.Sh EXIT STATUS
+.Ex -std
+.Sh EXAMPLES
+.Bd -literal
+curl -s 'https://codemadness.org/atom.xml' | sfeed
+.Ed
+.Pp
+To convert the character set from a feed that is not UTF-8 encoded the
+.Xr iconv 1
+tool can be used:
+.Bd -literal
+curl -s 'https://codemadness.org/some_iso-8859-1_feed.xml' | \e
+iconv -f iso-8859-1 -t utf-8 | \e
+sfeed
+.Ed
+.Sh EXAMPLE SETUP
+1. Create a directory for the sfeedrc configuration and the feeds:
+.Bd -literal
+ mkdir -p ~/.sfeed/feeds
+.Ed
+.Pp
+2. Copy the example
+.Xr sfeedrc 5
+configuration:
+.Bd -literal
+ cp sfeedrc.example ~/.sfeed/sfeedrc
+ $EDITOR ~/.sfeed/sfeedrc
+.Ed
+.Pp
+Or import existing OPML subscriptions using
+.Xr sfeed_opml_import 1 :
+.Bd -literal
+ sfeed_opml_import < file.opml > ~/.sfeed/sfeedrc
+.Ed
+.Pp
+3. To update feeds and merge the new items with existing items:
+.Bd -literal
+ sfeed_update
+.Ed
+.Pp
+4. Format feeds to a plain-text list:
+.Bd -literal
+ sfeed_plain ~/.sfeed/feeds/*
+.Ed
+.Pp
+Or format feeds to a curses interface:
+.Bd -literal
+ sfeed_curses ~/.sfeed/feeds/*
+.Ed
+.Pp
+There are also other formatting programs included.
+The README file has more examples.
+.Sh SEE ALSO
+.Xr sfeed_curses 1 ,
+.Xr sfeed_opml_import 1 ,
+.Xr sfeed_plain 1 ,
+.Xr sfeed_update 1 ,
+.Xr sfeed 5 ,
+.Xr sfeedrc 5
+.Sh AUTHORS
+.An Hiltjo Posthuma Aq Mt hiltjo@codemadness.org
+.Sh CAVEATS
+If a timezone for the timestamp field is not in the RFC822 or RFC3339 format it
+is not supported and the timezone is interpreted as UTC+0.