You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@abdera.apache.org by James M Snell <ja...@gmail.com> on 2007/05/30 17:30:24 UTC

RSS code

All,

I've implemented a set of extension classes that implement the Abdera
core APIs on top of RSS 2.0 and 1.0 feeds.  In other words, I can do
stuff like:

  URL url = new URL("http://scripting.com/rss.xml");
  Document<Feed> doc = abdera.getParser().parse(url.openStream());
  Feed feed = doc.getRoot();
  for (Entry entry : feed.getEntries()) {
    System.out.println(entry.getTitle());
    ...
  }

It is implemented just like any other extension and requires no
modifications to the core Abdera code.  It's not 100% complete yet, but
I wanted to check to see if there would be interest in checking it in to
the project, perhaps in a "contrib" module.

Several points:

  - it only reads RSS feeds. It cannot produce RSS.
  - it maintains the RSS infoset, it does not convert the data to Atom,
    it just looks like Atom at the API level
  - it does not handle non-wellformed feeds yet
  - it's not 100% complete yet

- James

Re: RSS code

Posted by James M Snell <ja...@gmail.com>.
Checked in!  Warning... I wrote this code yesterday.  It's very rough
and definitely has bugs.  It is quite incomplete at the moment.  I will
be fleshing it out over the coming weeks but feel free to get in and
play around as well.

The way this works is simple... once the build script that I have yet to
write builds the jar, folks simply need to drop that jar into the
classpath.  They can then start parsing RSS feeds.  There are
limitations and peculiarities to the API mapping that I will document
once I've figured them all out ;-).  This code is designed only to read
RSS feeds and not produce them, so all mod operations will (eventually)
result in an UnsupportedOperationException.  The idea is to get
something that works reasonable well with as many RSS feeds as possible,
not necessary to get something that works perfectly with all RSS feeds.

- James

Ugo Cei wrote:
> 
> On May 30, 2007, at 5:30 PM, James M Snell wrote:
> 
>> It is implemented just like any other extension and requires no
>> modifications to the core Abdera code.  It's not 100% complete yet, but
>> I wanted to check to see if there would be interest in checking it in to
>> the project, perhaps in a "contrib" module.
> 
> I am very much interested in it. I thought about doing something similar
> a while ago, but never found the time, so +1 from me.
> 
>     Ugo
> 
> 

Re: RSS code

Posted by Ugo Cei <ug...@gmail.com>.
On May 30, 2007, at 5:30 PM, James M Snell wrote:

> It is implemented just like any other extension and requires no
> modifications to the core Abdera code.  It's not 100% complete yet,  
> but
> I wanted to check to see if there would be interest in checking it  
> in to
> the project, perhaps in a "contrib" module.

I am very much interested in it. I thought about doing something  
similar a while ago, but never found the time, so +1 from me.

	Ugo


Re: RSS code

Posted by Adam Constabaris <ad...@clownsinmycoffee.net>.
James M Snell wrote:
> Yep. I was thinking about an optional contrib module that would build
> out separate jars.
> 
> - James

+1 to the idea of a contrib area generally.

AC

> 
> Garrett Rooney wrote:
>> On 5/30/07, James M Snell <ja...@gmail.com> wrote:
>>> All,
>>>
>>> I've implemented a set of extension classes that implement the Abdera
>>> core APIs on top of RSS 2.0 and 1.0 feeds.  In other words, I can do
>>> stuff like:
>>>
>>>   URL url = new URL("http://scripting.com/rss.xml");
>>>   Document<Feed> doc = abdera.getParser().parse(url.openStream());
>>>   Feed feed = doc.getRoot();
>>>   for (Entry entry : feed.getEntries()) {
>>>     System.out.println(entry.getTitle());
>>>     ...
>>>   }
>>>
>>> It is implemented just like any other extension and requires no
>>> modifications to the core Abdera code.  It's not 100% complete yet, but
>>> I wanted to check to see if there would be interest in checking it in to
>>> the project, perhaps in a "contrib" module.
>>>
>>> Several points:
>>>
>>>   - it only reads RSS feeds. It cannot produce RSS.
>>>   - it maintains the RSS infoset, it does not convert the data to Atom,
>>>     it just looks like Atom at the API level
>>>   - it does not handle non-wellformed feeds yet
>>>   - it's not 100% complete yet
>> I'd love to see this in the tree someplace, although I'd prefer that
>> it live in a separate module (i.e. a separate jar file).  I'd hate to
>> require people who only care about Atom support to carry around all
>> the classes required to deal with RSS.
>>
>> -garrett
>>


Re: RSS code

Posted by James M Snell <ja...@gmail.com>.
Yep. I was thinking about an optional contrib module that would build
out separate jars.

- James

Garrett Rooney wrote:
> On 5/30/07, James M Snell <ja...@gmail.com> wrote:
>> All,
>>
>> I've implemented a set of extension classes that implement the Abdera
>> core APIs on top of RSS 2.0 and 1.0 feeds.  In other words, I can do
>> stuff like:
>>
>>   URL url = new URL("http://scripting.com/rss.xml");
>>   Document<Feed> doc = abdera.getParser().parse(url.openStream());
>>   Feed feed = doc.getRoot();
>>   for (Entry entry : feed.getEntries()) {
>>     System.out.println(entry.getTitle());
>>     ...
>>   }
>>
>> It is implemented just like any other extension and requires no
>> modifications to the core Abdera code.  It's not 100% complete yet, but
>> I wanted to check to see if there would be interest in checking it in to
>> the project, perhaps in a "contrib" module.
>>
>> Several points:
>>
>>   - it only reads RSS feeds. It cannot produce RSS.
>>   - it maintains the RSS infoset, it does not convert the data to Atom,
>>     it just looks like Atom at the API level
>>   - it does not handle non-wellformed feeds yet
>>   - it's not 100% complete yet
> 
> I'd love to see this in the tree someplace, although I'd prefer that
> it live in a separate module (i.e. a separate jar file).  I'd hate to
> require people who only care about Atom support to carry around all
> the classes required to deal with RSS.
> 
> -garrett
> 

Re: RSS code

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On 5/30/07, James M Snell <ja...@gmail.com> wrote:
> All,
>
> I've implemented a set of extension classes that implement the Abdera
> core APIs on top of RSS 2.0 and 1.0 feeds.  In other words, I can do
> stuff like:
>
>   URL url = new URL("http://scripting.com/rss.xml");
>   Document<Feed> doc = abdera.getParser().parse(url.openStream());
>   Feed feed = doc.getRoot();
>   for (Entry entry : feed.getEntries()) {
>     System.out.println(entry.getTitle());
>     ...
>   }
>
> It is implemented just like any other extension and requires no
> modifications to the core Abdera code.  It's not 100% complete yet, but
> I wanted to check to see if there would be interest in checking it in to
> the project, perhaps in a "contrib" module.
>
> Several points:
>
>   - it only reads RSS feeds. It cannot produce RSS.
>   - it maintains the RSS infoset, it does not convert the data to Atom,
>     it just looks like Atom at the API level
>   - it does not handle non-wellformed feeds yet
>   - it's not 100% complete yet

I'd love to see this in the tree someplace, although I'd prefer that
it live in a separate module (i.e. a separate jar file).  I'd hate to
require people who only care about Atom support to carry around all
the classes required to deal with RSS.

-garrett