Re: News headline (RSS summary) behavior

Hello,
I just saw the RSS behavior made by Andrew H.: I actually did
something very similar a few days ago, maybe you find it useful. It uses
the FeedParser library (http://home.gna.org/ruby-feedparser/) that seems
to be able to parse more feeds than Simple-RSS.
It introduces a few item-specific tags, so that you can customize the
resulting output, like in this example:

<r:feed:items url=“http://some.feed/rss” limit=“5”>

- by ,

I’m quite new to Ruby programming so maybe code quality and design
choices are really bad. But at least it’s working (for me)…

You can find it here:

http://dev.incal.net/svn/radiant/rss_behavior/

I’ll be glad to receive any suggestions or comments.


ale

Ale wrote:

I just saw the RSS behavior made by Andrew H.: I actually did
something very similar a few days ago, maybe you find it useful.

I must have missed Andrew’s version. Where is it located?

Nice work! Please add it to the third-party behaviors page:

http://dev.radiantcms.org/radiant/wiki/ThirdPartyBehaviors


John

John W. Long wrote:

I must have missed Andrew’s version. Where is it located?

The thread seems to have been detached so I didn’t see these replies
first time around - have a look here:

http://www.ruby-forum.com/topic/76189

Ale’s lower level behavior is exactly the sort of thing I was talking
about in the second part of my original message so I don’t need to go to
the trouble of writing one now, since it’s already done! :slight_smile:

On 26/09/06, Bryan [email protected] wrote:

Hi,

How do you install this behavior in Radiant. I tried dropping the
rss_behavior.rb into vendor/plugins directory and restarting lightty.

Do I need to place init.rb somewhere?

Instructions for creating a plugin are at:

http://radiantcms.org/blog/2006/09/14/how-to-create-global-tags-in-a-plugin/


Regards,
Dave

How do you install this behavior in Radiant. I tried dropping the
rss_behavior.rb into vendor/plugins directory and restarting lightty.

you can insert directly in “app\behaviors” (if you have create a
radiant application with --unpack parameter).

Otherwise you have to install it as a plugin. Here you find how to
create
plugins:http://radiantcms.org/blog/2006/09/14/how-to-create-global-tags-in-a-plugin/

Hi,

How do you install this behavior in Radiant. I tried dropping the
rss_behavior.rb into vendor/plugins directory and restarting lightty.

Do I need to place init.rb somewhere?

Thanks,

Bryan

Hello,

I was able to install Feedparser and install the behavior. I have
selected the RSS Behavior from the drop down.

I have pasted the following into the page.

<r:feed:items url=“feed://feeds.feedburner.com/BurnThisRSS2” limit=“5”
/>

- by ,

I received the following error message for the page. I have tried a
couple different feed urls.

end tag not found for start tag `’

Could some suggest an actual link so that I can test this behavior?

Thanks,

Bryan

Thanks, that did the trick!

Bryan wrote:

I received the following error message for the page. I have tried a
couple different feed urls.

end tag not found for start tag `’

Could some suggest an actual link so that I can test this behavior?

It seems to me that your markup is wrong, it should be:

<r:feed:items url=“feed://feeds.feedburner.com/BurnThisRSS2” limit=“5”>

- by ,


ale

How would I go about modifying this plugin to use feed_tools, instead of
feedparser? I thought it would be as simple as changing the “require”
and Class, but it wasn’t :frowning:

Can someone point me in the right direction for a FeedParser gem or
repository. I missed where to get it from and Google hasn’t yielded
anything useful yet.

BTW, I downloaded the plugin off the ThirdPartyBehaviors page and it
looked like it was already properly setup as a plugin so I didn’t see
why I would need to generate a plugin for it as described above.

  • It is however crashing my install at the moment and rake says it
    doesn’t know where to go to get feedparser.

Loren

http://home.gna.org/ruby-feedparser/

there appears to be a .gem here:

http://download.gna.org/ruby-feedparser/

but I just installed it as a library and it’s working fine.

-jamie

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs