[Gambas-user] New component gb.rss to generate and parse RSS documents

Tobias Boege taboege at ...626...
Sun Apr 2 18:07:26 CEST 2017


Hello all,

I wrote an RSS feed generator for one of my projects recently and could
luckily complete also the parser before the new semester starts tomorrow.
So you get a gb.rss component in the latest revision #8117.

It should support all the things that are mentioned in the RSS 2.0
specification here [1], but there are still some problems:

  * The date conversion routines ignore timezones completely, because
    I have no clue about working with timezones in Gambas.

  * The strings you give to Rss* objects are put into the XML file
    verbatim currently, which is not desirable if these strings
    are HTML or some other things that confuse an RSS (XML) parser.
    I guess those strings should be wrapped in a CDATA section.
    I'd be grateful for a routine that tells me when to use CDATA.

The attached project demonstrates the feed generator part. It takes the
output of "ps", for the lack of a better data source, and turns it into
an RSS feed, which is then offered through gb.httpd. I tested the resulting
feed with newsbeuter. Just load the feed, start some new programs and then
reload the feed.

@Adrien or Fabien: While playing around with the XmlReader, I noticed some
problems. I tried to fix them to the best of my ability in #8116, but as
always it would be better if you looked through the matter again.

Regards,
Tobi

[1] http://cyber.harvard.edu/rss/rss.html

-- 
"There's an old saying: Don't change anything... ever!" -- Mr. Monk
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rsstest-0.0.1.tar.gz
Type: application/octet-stream
Size: 12080 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20170402/a00a3e26/attachment.obj>


More information about the User mailing list