From ae8517597a3a4ebe7fd352b5f96325bf5a9e9c0c Mon Sep 17 00:00:00 2001
From: Ronald Landheer-Cieslak Yara is a fast, embeddable RSS aggregator and parser. It is written in C++ and exposes a very simple API in C. 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:
- 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,
- and a footer. The template therefore consists of a template text for all three. 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,
- so I didn't see an immediate need to implement this. Yara comes with an example application, which is a stand-alone RSS viewer written in Turbo C++. The viewer loads the parser/renderer DLL
- 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
- a plug-in for your applications. Yara is a fast, embeddable RSS aggregator and parser. It is written in C++ and exposes a very simple API in C.
-
Yara: Yet Another RSS Aggregator
-
- For the time being, the C API consists of the following functions:
-
- int Yara_render(
- const char * target_filename /* name of the file to render into */,
- const char * template_filename /* compiled template to use */,
- const char * rss_xml /* RSS stream to parse and render */);
-
- /* returns 0 on success */
- int Yara_compileTemplate(
- const char * target_filename /* name of the file to save the compiled template to */,
- const char * header_filename /* name of the file with the header template */,
- const char * footer_filename /* name of the file with the footer template */,
- const char * item_filename /* name of the file with the item template */);
-
- /* returns a pointer to the most recent error message */
- const char * Yara_getLastError();
-
- /* pops the most recent error message and returns nothing */
- void Yara_popLastError();
-
-
-
-
-
- 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.
- To render an RSS stream, it searches in the template for tags that look like this: $$__tagname__$$. It then
- uses a perfect hash, generated by GNU gperf, to look up the function to use to insert whatever the tag corresponds to, and inserts
- whatever needs inserting.
- 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
- statically contains the RSS feed.
+
+
Yara: Yet Another RSS Aggregator
+
+ For the time being, the C API consists of the following functions:
+
+ int Yara_render(
+ const char * target_filename /* name of the file to render into */,
+ const char * template_filename /* compiled template to use */,
+ const char * rss_xml /* RSS stream to parse and render */);
+
+ /* returns 0 on success */
+ int Yara_compileTemplate(
+ const char * target_filename /* name of the file to save the compiled template to */,
+ const char * header_filename /* name of the file with the header template */,
+ const char * footer_filename /* name of the file with the footer template */,
+ const char * item_filename /* name of the file with the item template */);
+
+ /* returns a pointer to the most recent error message */
+ const char * Yara_getLastError();
+
+ /* pops the most recent error message and returns nothing */
+ void Yara_popLastError();
+
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: +
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, + and a footer. The template therefore consists of a template text for all three.
+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, + so I didn't see an immediate need to implement this.
+Yara comes with an example application, which is a stand-alone RSS viewer written in Turbo C++. The viewer loads the parser/renderer DLL + 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 + a plug-in for your applications.
+ + + -- 2.11.4.GIT