sfeed.1 - sfeed - RSS and Atom parser | |
git clone git://git.codemadness.org/sfeed | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
sfeed.1 (2947B) | |
--- | |
1 .Dd October 27, 2024 | |
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 w… | |
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 replace… | |
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 '\e' are escaped with '\e', so it becomes: '\et', '\e… | |
27 and '\e\e'. | |
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 … | |
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 -offset 4n | |
56 curl -s 'https://codemadness.org/atom.xml' | sfeed | |
57 .Ed | |
58 .Pp | |
59 To convert the character set from a feed that is not UTF-8 encoded the | |
60 .Xr iconv 1 | |
61 tool can be used: | |
62 .Bd -literal -offset 4n | |
63 curl -s 'https://codemadness.org/some_iso-8859-1_feed.xml' | \e | |
64 iconv -f iso-8859-1 -t utf-8 | \e | |
65 sfeed | |
66 .Ed | |
67 .Sh EXAMPLE SETUP | |
68 1. Create a directory for the sfeedrc configuration and the feeds: | |
69 .Bd -literal -offset 4n | |
70 mkdir -p ~/.sfeed/feeds | |
71 .Ed | |
72 .Pp | |
73 2. Copy the example | |
74 .Xr sfeedrc 5 | |
75 configuration: | |
76 .Bd -literal -offset 4n | |
77 cp sfeedrc.example ~/.sfeed/sfeedrc | |
78 $EDITOR ~/.sfeed/sfeedrc | |
79 .Ed | |
80 .Pp | |
81 Or import existing OPML subscriptions using | |
82 .Xr sfeed_opml_import 1 : | |
83 .Bd -literal -offset 4n | |
84 sfeed_opml_import < file.opml > ~/.sfeed/sfeedrc | |
85 .Ed | |
86 .Pp | |
87 3. To update feeds and merge the new items with existing items: | |
88 .Bd -literal -offset 4n | |
89 sfeed_update | |
90 .Ed | |
91 .Pp | |
92 4. Format feeds to a plain-text list: | |
93 .Bd -literal -offset 4n | |
94 sfeed_plain ~/.sfeed/feeds/* | |
95 .Ed | |
96 .Pp | |
97 Or format feeds to a curses interface: | |
98 .Bd -literal -offset 4n | |
99 sfeed_curses ~/.sfeed/feeds/* | |
100 .Ed | |
101 .Pp | |
102 There are also other formatting programs included. | |
103 The 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 [email protected] | |
113 .Sh CAVEATS | |
114 If a timezone for the timestamp field is not in the RFC 822 or RFC 3339 … | |
115 it is not supported and the timezone is interpreted as UTC+0. |