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
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
···
On Thu, 14 Oct 2004 06:03:27 +0900, Francis Hwang <sera@fhwang.net> wrote:
--
Austin Ziegler * halostatue@gmail.com
* Alternate: austin@halostatue.ca
: as of this email, I have [ 5 ] Gmail invitations
* 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);}
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
···
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 guess I just saw no RDoc over at the Ruby-doc.org standard lib page ( http://www.ruby-doc.org/stdlib/ ) 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);}
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.
<:((><
···
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).
Hi,
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.
Try using FeedForAll http://www.feedforall.com for rss feed creation. Makes
things a whole lot easier.
Best,
Bill Richardson
Quoteing ruby-talk@pcppopper.org, on Thu, Oct 14, 2004 at 06:49:04AM +0900:
* 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:
That tutorial doesn't hold for ruby1.8. Ruby1.8 doesn't have
a rss/maker, so the whole encoding section at the bottom isn't too
helpful. No idea if the parsing part is good.
Anybody know what happened to rss/maker?
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,
How exactly would anybody know WHICH of the many RSS libs on the RAA was
adopted into ruby?
Thanks,
Sam
* 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 (
RDoc Documentation ) 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);}
Hi,
In <B66E08DC-1D65-11D9-9029-000A95DBF456@fhwang.net>
"Re: using the RSS standard lib" on Thu, 14 Oct 2004 07:13:13 +0900,
···
Francis Hwang <sera@fhwang.net> wrote:
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
Thank you for your suggestion.
I added a pointer to lib/rss/rss.rb.
--
kou
Hi,
In <777793C4-1D80-11D9-8143-000A95CD7A8E@talbott.ws>
"Re: using the RSS standard lib" on Thu, 14 Oct 2004 10:29:25 +0900,
···
Nathaniel Talbott <nathaniel@talbott.ws> wrote:
is
there any way to get it to output a bit cleaner? There's tons of
extraneous whitespace in the generated XML.
Which of `tab indent' and `two or more new-lines' is your
problem? Or both?
If your answer is the first one, please wait. I'll change
`tab indent' of outputted RSS and source code to two spaces
indent.
--
kou
Francis Hwang wrote:
I guess I just saw no RDoc over at the Ruby-doc.org standard lib page ( RDoc Documentation ) 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
Sam Roberts wrote:
Quoteing ruby-talk@pcppopper.org, on Thu, Oct 14, 2004 at 06:49:04AM +0900:
* 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:
That tutorial doesn't hold for ruby1.8. Ruby1.8 doesn't have
a rss/maker, so the whole encoding section at the bottom isn't too
helpful. No idea if the parsing part is good.
Anybody know what happened to rss/maker?
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,
It appears that 1.8.2 preview 3 has an rss/maker section, but when I tried to run rdoc over this code I got a SystemStackError error:
/usr/local/lib/ruby/1.8/rdoc/code_objects.rb:328:in `find_symbol': stack level too deep (SystemStackError)
from /usr/local/lib/ruby/1.8/rdoc/code_objects.rb:328:in `find_symbol'
from /usr/local/lib/ruby/1.8/rdoc/code_objects.rb:328:in `find_symbol'
from /usr/local/lib/ruby/1.8/rdoc/code_objects.rb:328:in `find_symbol'
from /usr/local/lib/ruby/1.8/rdoc/code_objects.rb:328:in `find_symbol'
from /usr/local/lib/ruby/1.8/rdoc/code_objects.rb:328:in `find_symbol'
from /usr/local/lib/ruby/1.8/rdoc/code_objects.rb:328:in `find_symbol'
from /usr/local/lib/ruby/1.8/rdoc/code_objects.rb:328:in `find_symbol'
from /usr/local/lib/ruby/1.8/rdoc/code_objects.rb:328:in `find_symbol'
... 2118 levels...
from /usr/local/lib/ruby/1.8/rdoc/generators/html_generator.rb:1210:in `generate_html'
from /usr/local/lib/ruby/1.8/rdoc/generators/html_generator.rb:1130:in `generate'
from /usr/local/lib/ruby/1.8/rdoc/rdoc.rb:269:in `document'
from /usr/local/bin/rdoc:63
This is using ruby 1.8.2 (2004-07-29) [i586-linux]
running rdoc from the /lib/rss directory of the preview 3 source code
James
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?
is
there any way to get it to output a bit cleaner? There's tons of
extraneous whitespace in the generated XML.
Which of `tab indent' and `two or more new-lines' is your
problem? Or both?
If your answer is the first one, please wait. I'll change
`tab indent' of outputted RSS and source code to two spaces
indent.
I'm glad to hear the indentation is changing, but the multiple newlines in the outputted XML is more what I was talking about:
<?xml version="1.0"?>
<rss version="2.0">
<channel>
<title>talbott.ws</title>
<link>http://homeplace/</link>
<description>The Talbott family's blog.</description>
... 11 newlines ...
<item>
<title>Another post!</title>
<link>http://homeplace/weblog/permalink/2004/10/12/another-post.html</
<description><p>Stuff!!!</p></description>
...5 newlines...
<pubDate>Tue, 12 Oct 2004 20:35:02 -0400</pubDate>
It doesn't affect the function of the feed at all, but I guess I'm just a bit picky about the form of things. Is there already a way to clean this up? If not, can you add one?
Thanks,
Nathaniel
Terralien, Inc.
<:((><
···
On Oct 14, 2004, at 00:54, Kouhei Sutou wrote:
Nathaniel Talbott <nathaniel@talbott.ws> wrote:
Quoteing jamesUNDERBARb@neurogami.com, on Fri, Nov 12, 2004 at 01:28:51PM +0900:
Sam Roberts wrote:
>Anybody know what happened to rss/maker?
Ok, I still don't know what happened, but I think the darwinports version of
the preview doesn't have rss/maker, but has the rest. I'm a little confused.
Anyhow, I downloaded and manually installed rss1.0 from the RAA, and I have
rss/maker.
Sorry!
It appears that 1.8.2 preview 3 has an rss/maker section, but when I
tried to run rdoc over this code I got a SystemStackError error:
/usr/local/lib/ruby/1.8/rdoc/code_objects.rb:328:in `find_symbol': stack
level too deep (SystemStackError)
from /usr/local/lib/ruby/1.8/rdoc/code_objects.rb:328:in
`find_symbol'
from /usr/local/lib/ruby/1.8/rdoc/code_objects.rb:328:in
`find_symbol'
from /usr/local/lib/ruby/1.8/rdoc/code_objects.rb:328:in
`find_symbol'
from /usr/local/lib/ruby/1.8/rdoc/code_objects.rb:328:in
`find_symbol'
from /usr/local/lib/ruby/1.8/rdoc/code_objects.rb:328:in
`find_symbol'
from /usr/local/lib/ruby/1.8/rdoc/code_objects.rb:328:in
`find_symbol'
from /usr/local/lib/ruby/1.8/rdoc/code_objects.rb:328:in
`find_symbol'
from /usr/local/lib/ruby/1.8/rdoc/code_objects.rb:328:in
`find_symbol'
... 2118 levels...
from
/usr/local/lib/ruby/1.8/rdoc/generators/html_generator.rb:1210:in
`generate_html'
from
/usr/local/lib/ruby/1.8/rdoc/generators/html_generator.rb:1130:in `generate'
from /usr/local/lib/ruby/1.8/rdoc/rdoc.rb:269:in `document'
from /usr/local/bin/rdoc:63
This is using ruby 1.8.2 (2004-07-29) [i586-linux]
running rdoc from the /lib/rss directory of the preview 3 source code
I get similar results, too, see below.
Sam
maker.rb: mmc.
lib/rss/maker.rb:12:38: Skipping require of dynamic string: "#{prefix}/#{version}"
lib/rss/maker.rb:14:36: Skipping require of dynamic string: "#{prefix}/#{mod}"
...
parser.rb: mc.c.c.c.cc....c.......cc.......m............
rexmlparser.rb: mc..c.
rss.rb: cc.m.mcc.cc.c.c.c.c.c.c.c.m.......cc.......................m....
syndication.rb: mm....cc
taxonomy.rb: mm
lib/rss/taxonomy.rb:24:54: unexpected token: '#<RubyToken::TkLPAREN:0x6e7328 @text="(", @char_no=15, @line_no=22>'
cccc
trackback.rb: mm.m.cc.....cc.....m...cc...cc...ccccc
utils.rb: mm..
xml-stylesheet.rb: mm..c
lib/rss/xml-stylesheet.rb:35:29: unexpected token: '#<RubyToken::TkLPAREN:0x75e8d8 @text="(", @char_no=17, @line_no=35>'
.....
xmlparser.rb: mcmcmc......c..c.
xmlscanner.rb: mc..c..............
Generating HTML...
/opt/local/lib/ruby/1.8/rdoc/code_objects.rb:327:in `find_symbol': stack level too deep (SystemStackError)
from /opt/local/lib/ruby/1.8/rdoc/code_objects.rb:328:in `find_symbol'
from /opt/local/lib/ruby/1.8/rdoc/code_objects.rb:328:in `find_symbol'
from /opt/local/lib/ruby/1.8/rdoc/code_objects.rb:328:in `find_symbol'
from /opt/local/lib/ruby/1.8/rdoc/code_objects.rb:328:in `find_symbol'
from /opt/local/lib/ruby/1.8/rdoc/code_objects.rb:328:in `find_symbol'
from /opt/local/lib/ruby/1.8/rdoc/code_objects.rb:328:in `find_symbol'
from /opt/local/lib/ruby/1.8/rdoc/code_objects.rb:328:in `find_symbol'
from /opt/local/lib/ruby/1.8/rdoc/code_objects.rb:328:in `find_symbol'
... 634 levels...
from /opt/local/lib/ruby/1.8/rdoc/generators/html_generator.rb:1210:in `generate_html'
from /opt/local/lib/ruby/1.8/rdoc/generators/html_generator.rb:1130:in `generate'
from /opt/local/lib/ruby/1.8/rdoc/rdoc.rb:269:in `document'
from /opt/local/bin/rdoc:63
Strange: I just ran the latest RDoc against that directory. I got a warning about an unexpected token in xml-stylesheet.rb, but no SystemStackError.
Could you tell me if you see this with the latest RDoc from CVS?
Cheers
Dave
···
On Nov 11, 2004, at 22:28, James Britt wrote:
It appears that 1.8.2 preview 3 has an rss/maker section, but when I tried to run rdoc over this code I got a SystemStackError error:
Hi,
In <9C48C25C-1EAE-11D9-8143-000A95CD7A8E@talbott.ws>
"Re: using the RSS standard lib" on Fri, 15 Oct 2004 22:32:15 +0900,
I'm glad to hear the indentation is changing, but the multiple newlines
in the outputted XML is more what I was talking about:
(snip)
a bit picky about the form of things. Is there already a way to clean
this up? If not, can you add one?
I added it and committed. Please try it.
I'll add convenient API for making new RSS soon. If someone
has some ideas, please tell me.
···
Nathaniel Talbott <nathaniel@talbott.ws> wrote:
--
kou
Hi,
In <fQqbd.40229$H11.1367319@twister1.libero.it>
"Re: using the RSS standard lib" on Thu, 14 Oct 2004 17:34:36 +0900,
···
gabriele renzi <rff_rff@remove-yahoo.it> wrote:
while we're talking about RSS.. it is planed to ever support ATOM or is
that too much a different beast?
I think it is not work of RSS Parser. It is the talk of the
layer above RSS Parser.
Would you write multiple feeds parser?
--
kou
Quoteing dave@pragprog.com, on Sat, Nov 13, 2004 at 02:34:32AM +0900:
>It appears that 1.8.2 preview 3 has an rss/maker section, but when I
>tried to run rdoc over this code I got a SystemStackError error:
Strange: I just ran the latest RDoc against that directory. I got a
warning about an unexpected token in xml-stylesheet.rb, but no
SystemStackError.
Could you tell me if you see this with the latest RDoc from CVS?
I installed ruby from cvs, I don't see any problems with it, just a few
"unexpected token" errors.
The one that was dying with stack was version:
RDoc V1.0pr1: 2004/04/04 23:19:58 (1.1.2.6)
But I guess the latest is doing good.
Cheers,
Sam
$ rdoc18 rss
0.9.rb: mm.c........c....c..c...c...c....c...c...c..m.
1.0.rb: mm.cc......cc......cc....cc......cc....cc....ccc......cc.....cc.....cc.....m.
2.0.rb: mcc...c...c...
content.rb: mm..cc
converter.rb: mc.................
dublincore.rb: mm..ccccc
0.9.rb: mmc...c......cc..c.c..c.c.c.c.c..
1.0.rb: mmc......c.....cc...c.c..c.c.c.c.c..
2.0.rb: mmc.c..c..ccc..c..c..c..c..c
base.rb: mmm.......cc..........c...c...c...c.c..c.....c...ccccc.
content.rb: mmm.cc
dublincore.rb: mmm.ccccc
syndication.rb: mmm.c
trackback.rb: mmm.cc
maker.rb: mmc.
rss/maker.rb:12:38: Skipping require of dynamic string: "#{prefix}/#{version}"
rss/maker.rb:14:36: Skipping require of dynamic string: "#{prefix}/#{mod}"
...
parser.rb: mc.c.c.c.cc....c.......cc.......m............
rexmlparser.rb: mc..c.
rss.rb: cc.m.mcc.cc.c.c.c.c.c.c.c.m.......cc.......................m....
syndication.rb: mm....cc
taxonomy.rb: mm
rss/taxonomy.rb:24:54: unexpected token: '#<RubyToken::TkLPAREN:0x734fd0 @text="(", @char_no=15, @line_no=22>'
cccc
trackback.rb: mm.m.cc.....cc.....m...cc...cc...ccccc
utils.rb: mm..
xml-stylesheet.rb: mm..c
rss/xml-stylesheet.rb:35:29: unexpected token: '#<RubyToken::TkLPAREN:0x79d4cc @text="(", @char_no=17, @line_no=35>'
.....
xmlparser.rb: mcmcmc......c..c.
xmlscanner.rb: mc..c..............
Generating HTML...
Files: 25
Classes: 153
Modules: 58
Methods: 362
Elapsed: 19.135s
···
On Nov 11, 2004, at 22:28, James Britt wrote: