[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

using the RSS standard lib

Francis Hwang

10/13/2004 9:03:00 PM

Is anybody out there using the RSS standard lib that comes with Ruby
1.8.2? I'm trying to make use of it but am finding the lack of
documentation frustrating.

Also, is it possible to use this to do parsing of multiple feeds each
of a different version? Require "rss/2.0" seems to force me to use 2.0
parsing for all my feeds, but what if I'm parsing a bunch of feeds with
different versions?

Francis



21 Answers

Austin Ziegler

10/13/2004 9:10:00 PM

0

On Thu, 14 Oct 2004 06:03:27 +0900, Francis Hwang <sera@fhwang.net> wrote:
> Is anybody out there using the RSS standard lib that comes with Ruby
> 1.8.2? I'm trying to make use of it but am finding the lack of
> documentation frustrating.

It's worse when you try to read the source, since it's not conformant
to the rest of the Ruby codebase standard.

> Also, is it possible to use this to do parsing of multiple feeds each
> of a different version? Require "rss/2.0" seems to force me to use 2.0
> parsing for all my feeds, but what if I'm parsing a bunch of feeds with
> different versions?

I haven't seen anything that allows you to do anything smart like this.

-austin
--
Austin Ziegler * halostatue@gmail.com
* Alternate: austin@halostatue.ca
: as of this email, I have [ 5 ] Gmail invitations


Nikolai Weibull

10/13/2004 9:49:00 PM

0

* Francis Hwang <sera@fhwang.net> [Oct 13, 2004 23:10]:
> Also, is it possible to use this to do parsing of multiple feeds each
> of a different version? Require "rss/2.0" seems to force me to use 2.0
> parsing for all my feeds, but what if I'm parsing a bunch of feeds with
> different versions?

Straight from Tutorial.en from rss-0.0.9:

Include this if you want to handle RSS 0.9x/1.0/2.0:

require 'rss/1.0'
require 'rss/2.0'

You don't need including it because of RSS 2.0 includes RSS 0.9x:

require 'rss/0.9'

Sure, there's no documentation in /usr/lib/ruby/1.8, but there's
certainly documentation available. Look for rss on raa. Didn't take
much work. Good luck,
nikolai

--
::: name: Nikolai Weibull :: aliases: pcp / lone-star / aka :::
::: born: Chicago, IL USA :: loc atm: Gothenburg, Sweden :::
::: page: www.pcppopper.org :: fun atm: gf,lps,ruby,lisp,war3 :::
main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}


Dave Thomas

10/13/2004 9:59:00 PM

0


On Oct 13, 2004, at 16:03, Francis Hwang wrote:

> Is anybody out there using the RSS standard lib that comes with Ruby
> 1.8.2? I'm trying to make use of it but am finding the lack of
> documentation frustrating.

I'm using it every day to create RSS feeds from non RSS sources (such
as CVS commit logs and amazon sales ranks).

There's documentation and examples of using it in the new PickAxe (he
says, at the risk of sounding like a salesman).


Cheers

Dave



Francis Hwang

10/13/2004 10:13:00 PM

0

I guess I just saw no RDoc over at the Ruby-doc.org standard lib page (
http://www.ruby-doc.o... ) and assumed that was the end of that.
I always forget to look over at RAA, so thanks for that reminder.

May I humbly suggest that at least there could be a pointer to the
tutorial buried in the .rb files? I mean, I'm familiar enough with Ruby
that I should've thought to look at RAA, but not every Ruby user is.

Francis


On Oct 13, 2004, at 5:49 PM, Nikolai Weibull wrote:

> * Francis Hwang <sera@fhwang.net> [Oct 13, 2004 23:10]:
>> Also, is it possible to use this to do parsing of multiple feeds each
>> of a different version? Require "rss/2.0" seems to force me to use 2.0
>> parsing for all my feeds, but what if I'm parsing a bunch of feeds
>> with
>> different versions?
>
> Straight from Tutorial.en from rss-0.0.9:
>
> Include this if you want to handle RSS 0.9x/1.0/2.0:
>
> require 'rss/1.0'
> require 'rss/2.0'
>
> You don't need including it because of RSS 2.0 includes RSS 0.9x:
>
> require 'rss/0.9'
>
> Sure, there's no documentation in /usr/lib/ruby/1.8, but there's
> certainly documentation available. Look for rss on raa. Didn't take
> much work. Good luck,
> nikolai
>
> --
> ::: name: Nikolai Weibull :: aliases: pcp / lone-star / aka :::
> ::: born: Chicago, IL USA :: loc atm: Gothenburg, Sweden :::
> ::: page: www.pcppopper.org :: fun atm: gf,lps,ruby,lisp,war3 :::
> main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}
>



Nikolai Weibull

10/13/2004 11:15:00 PM

0

* Francis Hwang <sera@fhwang.net> [Oct 14, 2004 00:20]:
> I guess I just saw no RDoc over at the Ruby-doc.org standard lib page (
> http://www.ruby-doc.o... ) and assumed that was the end of that.
> I always forget to look over at RAA, so thanks for that reminder.
>
> May I humbly suggest that at least there could be a pointer to the
> tutorial buried in the .rb files? I mean, I'm familiar enough with Ruby
> that I should've thought to look at RAA, but not every Ruby user is.

Yeah, the documentation of the standard libraries is lacking for many
libraries (look at mkmf for example...it's a pain trying to figure out
what you can do with it).
nikolai

--
::: name: Nikolai Weibull :: aliases: pcp / lone-star / aka :::
::: born: Chicago, IL USA :: loc atm: Gothenburg, Sweden :::
::: page: www.pcppopper.org :: fun atm: gf,lps,ruby,lisp,war3 :::
main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}


Nathaniel Talbott

10/14/2004 1:29:00 AM

0

On Oct 13, 2004, at 17:58, Dave Thomas wrote:

>> Is anybody out there using the RSS standard lib that comes with Ruby
>> 1.8.2? I'm trying to make use of it but am finding the lack of
>> documentation frustrating.
>
> I'm using it every day to create RSS feeds from non RSS sources (such
> as CVS commit logs and amazon sales ranks).
>
> There's documentation and examples of using it in the new PickAxe (he
> says, at the risk of sounding like a salesman).

Question for the group, while we're on the topic: I've just started
using it to generate feeds myself (for the blog I'm writing)... is
there any way to get it to output a bit cleaner? There's tons of
extraneous whitespace in the generated XML.

Thanks,


Nathaniel
Terralien, Inc.

<:((><



Kouhei Sutou

10/14/2004 4:41:00 AM

0

Kouhei Sutou

10/14/2004 4:55:00 AM

0

James Britt

10/14/2004 7:15:00 AM

0

Francis Hwang wrote:
> I guess I just saw no RDoc over at the Ruby-doc.org standard lib page (
> http://www.ruby-doc.o... ) and assumed that was the end of that.
> I always forget to look over at RAA, so thanks for that reminder.
>
> May I humbly suggest that at least there could be a pointer to the
> tutorial buried in the .rb files? I mean, I'm familiar enough with Ruby
> that I should've thought to look at RAA, but not every Ruby user is.

Might it not be better to ensure that such documentation is readily
available from the Rdoc files in the first place? If something is being
included as part of the standard library then its documentation should
be complete and easily accessible.

Why should one have to think of it as a stand-alone project in order to
locate the docs?


James


gabriele renzi

10/14/2004 8:32:00 AM

0

Kouhei Sutou ha scritto:

>
> Thank you for your suggestion.
> I added a pointer to lib/rss/rss.rb.
>

while we're talking about RSS.. it is planed to ever support ATOM or is
that too much a different beast?