sfeed.1.html - 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
---
sfeed.1.html (6117B)
---
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <meta charset="utf-8"/>
5 <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
6 <style>
7 table.head, table.foot { width: 100%; }
8 td.head-rtitle, td.foot-os { text-align: right; }
9 td.head-vol { text-align: center; }
10 .Nd, .Bf, .Op { display: inline; }
11 .Pa, .Ad { font-style: italic; }
12 .Ms { font-weight: bold; }
13 .Bl-diag > dt { font-weight: bold; }
14 code.Nm, .Fl, .Cm, .Ic, code.In, .Fd, .Fn, .Cd { font-weight: bold;
15 font-family: inherit; }
16 </style>
17 <title>SFEED(1)</title>
18 </head>
19 <body>
20 <table class="head">
21 <tr>
22 <td class="head-ltitle">SFEED(1)</td>
23 <td class="head-vol">General Commands Manual</td>
24 <td class="head-rtitle">SFEED(1)</td>
25 </tr>
26 </table>
27 <div class="manual-text">
28 <section class="Sh">
29 <h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
30 <p class="Pp"><code class="Nm">sfeed</code> — <span class="Nd">RSS and
31 Atom parser</span></p>
32 </section>
33 <section class="Sh">
34 <h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
35 <table class="Nm">
36 <tr>
37 <td><code class="Nm">sfeed</code></td>
38 <td>[<var class="Ar">baseurl</var>]</td>
39 </tr>
40 </table>
41 </section>
42 <section class="Sh">
43 <h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
44 <p class="Pp"><code class="Nm">sfeed</code> reads RSS or Atom feed data (XML)
45 from stdin. It writes the feed data in a TAB-separated format to stdout. If
46 the <var class="Ar">baseurl</var> argument is a valid absolute URL then the
47 relative links or enclosures will be made an absolute URL.</p>
48 </section>
49 <section class="Sh">
50 <h1 class="Sh" id="TAB-SEPARATED_FORMAT_FIELDS"><a class="permalink" href="#TAB-SEPARATED_FORMAT_FIELDS">TAB-SEPARATED
51 FORMAT FIELDS</a></h1>
52 <p class="Pp">The items are output per line in a TAB-separated format.</p>
53 <p class="Pp">For the fields title, id and author each whitespace character is
54 replaced by a SPACE character. Control characters are removed.</p>
55 <p class="Pp">The content field can contain newlines and these are escaped.
56 TABs, newlines and '\' are escaped with '\', so it becomes: '\t', '\n' and
57 '\\'. Other whitespace characters except spaces are removed. Control
58 characters are removed.</p>
59 <p class="Pp">The order and content of the fields are:</p>
60 <dl class="Bl-tag">
61 <dt>1. timestamp</dt>
62 <dd>UNIX timestamp in UTC+0, empty if missing or on a parse failure.</dd>
63 <dt>2. title</dt>
64 <dd>Title text, HTML code in titles is ignored and is treated as
65 plain-text.</dd>
66 <dt>3. link</dt>
67 <dd>Link</dd>
68 <dt>4. content</dt>
69 <dd>Content, can have plain-text or HTML code depending on the content-type
70 field.</dd>
71 <dt>5. content-type</dt>
72 <dd>"html" or "plain" if it has content.</dd>
73 <dt>6. id</dt>
74 <dd>RSS item GUID or Atom id.</dd>
75 <dt>7. author</dt>
76 <dd>Item, first author.</dd>
77 <dt>8. enclosure</dt>
78 <dd>Item, first enclosure.</dd>
79 <dt>9. category</dt>
80 <dd>Item, categories, multiple values are separated by the '|' character.</dd>
81 </dl>
82 </section>
83 <section class="Sh">
84 <h1 class="Sh" id="EXIT_STATUS"><a class="permalink" href="#EXIT_STATUS">EXIT
85 STATUS</a></h1>
86 <p class="Pp">The <code class="Nm">sfeed</code> utility exits 0 on
87 success, and >0 if an error occurs.</p>
88 </section>
89 <section class="Sh">
90 <h1 class="Sh" id="EXAMPLES"><a class="permalink" href="#EXAMPLES">EXAMPLES</a></h1>
91 <div class="Bd Li">
92 <pre>curl -s 'https://codemadness.org/atom.xml' | sfeed</pre>
93 </div>
94 <p class="Pp">To convert the character set from a feed that is not UTF-8 encoded
95 the <a class="Xr">iconv(1)</a> tool can be used:</p>
96 <div class="Bd Pp Li">
97 <pre>curl -s 'https://codemadness.org/some_iso-8859-1_feed.xml' | \
98 iconv -f iso-8859-1 -t utf-8 | \
99 sfeed</pre>
100 </div>
101 </section>
102 <section class="Sh">
103 <h1 class="Sh" id="EXAMPLE_SETUP"><a class="permalink" href="#EXAMPLE_SETUP">EXAMPLE
104 SETUP</a></h1>
105 <p class="Pp">1. Create a directory for the sfeedrc configuration and the
106 feeds:</p>
107 <div class="Bd Pp Li">
108 <pre> mkdir -p ~/.sfeed/feeds</pre>
109 </div>
110 <p class="Pp">2. Copy the example <a class="Xr">sfeedrc(5)</a>
111 configuration:</p>
112 <div class="Bd Pp Li">
113 <pre> cp sfeedrc.example ~/.sfeed/sfeedrc
114 $EDITOR ~/.sfeed/sfeedrc</pre>
115 </div>
116 <p class="Pp">Or import existing OPML subscriptions using
117 <a class="Xr">sfeed_opml_import(1)</a>:</p>
118 <div class="Bd Pp Li">
119 <pre> sfeed_opml_import < file.opml > ~/.sfeed/sfeedrc</pre>
120 </div>
121 <p class="Pp">3. To update feeds and merge the new items with existing
122 items:</p>
123 <div class="Bd Pp Li">
124 <pre> sfeed_update</pre>
125 </div>
126 <p class="Pp">4. Format feeds to a plain-text list:</p>
127 <div class="Bd Pp Li">
128 <pre> sfeed_plain ~/.sfeed/feeds/*</pre>
129 </div>
130 <p class="Pp">Or format feeds to a curses interface:</p>
131 <div class="Bd Pp Li">
132 <pre> sfeed_curses ~/.sfeed/feeds/*</pre>
133 </div>
134 <p class="Pp">There are also other formatting programs included. The README file
135 has more examples.</p>
136 </section>
137 <section class="Sh">
138 <h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
139 ALSO</a></h1>
140 <p class="Pp"><a class="Xr">sfeed_curses(1)</a>,
141 <a class="Xr">sfeed_opml_import(1)</a>, <a class="Xr">sfeed_plain(1)</a>,
142 <a class="Xr">sfeed_update(1)</a>, <a class="Xr">sfeed(5)</a>,
143 <a class="Xr">sfeedrc(5)</a></p>
144 </section>
145 <section class="Sh">
146 <h1 class="Sh" id="AUTHORS"><a class="permalink" href="#AUTHORS">AUTHORS</a></h1>
147 <p class="Pp"><span class="An">Hiltjo Posthuma</span>
148 <<a class="Mt" href="mailto:hiltjo@codemadness.org">hiltjo@codemadness.org</a>></p>
149 </section>
150 <section class="Sh">
151 <h1 class="Sh" id="CAVEATS"><a class="permalink" href="#CAVEATS">CAVEATS</a></h1>
152 <p class="Pp">If a timezone for the timestamp field is not in the RFC822 or
153 RFC3339 format it is not supported and the timezone is interpreted as
154 UTC+0.</p>
155 </section>
156 </div>
157 <table class="foot">
158 <tr>
159 <td class="foot-date">January 7, 2023</td>
160 <td class="foot-os">Some OS 1.0</td>
161 </tr>
162 </table>
163 </body>
164 </html>