1 <?xml version=
"1.0" encoding=
"iso-8859-1"?>
2 <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns=
"http://www.w3.org/1999/xhtml">
5 <title>Yara: Yet Anoter RSS Aggregator
</title>
6 <meta name=
"description" content=
"Yara: Yet Another RSS Aggregator" />
7 <meta name=
"keywords" content=
"Yara, RSS, RSS Aggregator, parser, renderer" />
8 <meta name=
"Generator" content=
"Hand-written in VIM" />
9 <meta name=
"robots" content=
"index, follow" />
10 <link rel=
"shortcut icon" href=
"Yara.ico" />
11 <meta http-equiv=
"Content-Type" content=
"text/html; charset=iso-8859-1" />
12 <link href=
"index.css" rel=
"stylesheet" type=
"text/css"/>
15 <h1>Yara: Yet Another RSS Aggregator
</h1>
16 <p>Yara is a fast, embeddable RSS aggregator and parser. It is written in C++ and exposes a very simple API in C.
</p>
17 <p>Yara is designed to be as fast as possible, yet be usable and maintainable. Some of the choices for the parser and the renderer were made uniquely for speed:
19 <li>Yara uses the Expat XML parser, which is the fastest XML parser I know.
<br/>
20 Though Expat is neither a SAX nor a DOM parser, it suits its purpose exactly and is the de-facto standard for fast XML parsing.
</li>
21 <li>Yara uses
<i>templates
</i> for rendering, in which it replaces tags with the contents of what it found in the RSS stream.
<br/>
22 To render an RSS stream, it searches in the template for tags that look like this:
<span class=
"code">$$__tagname__$$
</span>. It then
23 uses a perfect hash, generated by GNU gperf, to look up the function to use to insert whatever the tag corresponds to, and inserts
24 whatever needs inserting.
<br/>
25 This means that this RSS renderer doesn't necessarily render RSS into HTML: you could, if you wanted, use it to generate C code that
26 statically contains the RSS feed.
</li>
29 <p>Parsing is done in two steps: first, the RSS stream is parsed, then the template is used to generate a header, each item found in the stream,
30 and a footer. The template therefore consists of a template text for all three.
</p>
31 <p>Yara will not download the stream for you: most RAD tools, frameworks, etc. come with easy-to-use methods to download files from the internet,
32 so I didn't see an immediate need to implement this.
</p>
33 <p>Yara comes with an example application, which is a stand-alone RSS viewer written in Turbo C++. The viewer loads the parser/renderer DLL
34 dynamically, which is intended to demonstrate not only that the DLL can be compiled with a different C++ compiler, but that it can be used as
35 a plug-in for
<em>your
</em> applications.
</p>