source: project/rss/rss.html @ 1270

Last change on this file since 1270 was 1270, checked in by felix winkelmann, 14 years ago

all simple eggs have proper setup script, now

File size: 4.8 KB
Line 
1<html>
2<head><title>Eggs Unlimited - rss</title>
3<style type="text/css">
4  <!--
5      CODE {
6             color: #666666;
7           }
8      EM {
9           font-weight: bold;
10           font-style: normal;
11         }
12      DT.function { 
13                    background: #f5f5f5;
14                    color: black;
15                    padding: 0.1em;
16                    border: 1px solid #bbbaaf;
17                    font-family: monospace;
18                  }
19      PRE {
20        background: #efeee0;
21        padding: 0.1em;
22        border: 1px solid #bbbaaf;
23      }
24    -->
25</style></head>
26<body>
27
28<center><img src="egg.jpg"></center>
29<center><a href="index.html">back</a></center>
30
31<h2>rss</h2>
32
33<h3>Description:</h3>
34A RSS parser.
35
36<h3>Author:</h3>
37<a href="mailto:felix@call-with-current-continuation.org">felix</a>
38
39<h3>Version:</h3>
40<ul>
41<li>1.1 Small fix in <code>rss:item=?</code> by Daishi Kato
42<li>1.0
43</ul>
44
45<h3>Requirements:</h3>
46<a href="ssax.html">ssax</a>
47
48<h3>Usage:</h3>
49<pre>
50(require-extension rss)
51</pre>
52
53<h3>Download:</h3>
54<a href="rss.egg">rss.egg</a>
55
56<h3>Documentation:</h3>
57
58A basic RSS parser, supporting 0.92, 1.0 and 2.0 formats.
59
60<br>All errors signalled by the feed reader are composite conditions of the <code>exn</code> and <code>rss</code> kinds.
61
62<dl>
63
64<p><dt class="function">[procedure] (rss:read [PORT])</dt>
65<p><dd>Reads an RSS feed from the given <code>PORT</code>, or from the value of <code>(current-input-port)</code>, if no
66port is specified. A <code>rss:feed</code> record is returned.
67
68<p><dt class="function">[record] rss:feed<br>
69[procedure] (rss:feed? x)<br>
70[procedure] (rss:feed-version FEED)<br>
71[procedure] (rss:feed-channel FEED)<br>
72[procedure] (rss:feed-items FEED)</dt>
73<p><dd>A record that holds information for an RSS feed. The <code>version</code> field contains a string, the <code>channel</code>
74field and the <code>items</code> hold a single <code>rss:item</code> and a list of <code>rss:item</code>s, respectively.
75
76<p><dt class="function">[record] rss:item<br>
77[procedure] (rss:item? X)<br>
78[procedure] (rss:item-title ITEM)<br>
79[procedure] (rss:item-link ITEM)<br>
80[procedure] (rss:item-description ITEM)<br>
81[procedure] (rss:item-attributes ITEM)</dt>
82<p><dd>A record containing data of a RSS item. The <code>title</code>, <code>link</code> and <code>description</code> fields are strings, the
83<code>attributes</code> field holds an association list mapping symbols to strings and contain all sub-elements of a specific RSS
84item, including the <code>title</code>, <code>link</code> and <code>description</code> values.
85So:
86
87<pre>
88(eq? (alist-ref 'title (rss:item-attributes ITEM)) (rss:item-title ITEM))  ==&gt;  #t
89</pre>
90
91The <code>item</code> attribute is an SXML expression of the form
92
93<pre>
94(image (title STRING) ...)
95</pre>
96
97where <code>...</code> hold additional subelements of the image attribute.
98
99<p><dt class="function">[procedure] (rss:item-attribute ITEM SYMBOL)</dt>
100<p><dd>Returns the attribute <code>SYMBOL</code> of the RSS feed item <code>ITEM</code> or <code>#f</code> if the item does
101not contain an attribute of this name.
102
103<p><dt class="function">[procedure] (rss:item=? ITEM ITEM)</dt>
104<p><dd>Returns <code>#t</code> if the items have identical GUID attributes or (if no GUIDs are available) if the items have the
105same contents.
106
107</dl>
108
109
110<h3>License:</h3>
111
112<pre>
113Copyright (c) 2004, Felix L. Winkelmann
114All rights reserved.
115
116Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following
117conditions are met:
118
119  Redistributions of source code must retain the above copyright notice, this list of conditions and the following
120    disclaimer.
121  Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following
122    disclaimer in the documentation and/or other materials provided with the distribution.
123  Neither the name of the author nor the names of its contributors may be used to endorse or promote
124    products derived from this software without specific prior written permission.
125
126THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS
127OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
128AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR
129CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
130CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
131SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
132THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
133OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
134POSSIBILITY OF SUCH DAMAGE.
135</pre>
136
137
138<hr><a href="index.html">back</a>
139
140</body>
141</html>
Note: See TracBrowser for help on using the repository browser.