# Re: News headline (RSS summary) behavior

**URL:** <https://www.ruby-forum.com/t/re-news-headline-rss-summary-behavior/101686>\
**Category:** Radiant CMS\
**Created:** [August 7, 2006, 1:12pm UTC](https://www.ruby-forum.com/t/re-news-headline-rss-summary-behavior/101686 "2006-08-07T13:12:22Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![ale](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/f19dbf/32.png) [@ale](https://www.ruby-forum.com/u/ale)\
**Post date:** [August 7, 2006, 1:12pm UTC](https://www.ruby-forum.com/t/re-news-headline-rss-summary-behavior/101686/1 "2006-08-07T13:12:22Z")

</div>

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/](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](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/](http://dev.incal.net/svn/radiant/rss_behavior/)

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

–  
ale

---

<div class="post-metadata">

**Author:** ![ale](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/f19dbf/32.png) [@ale](https://www.ruby-forum.com/u/ale)\
**Post date:** [August 7, 2006, 3:15pm UTC](https://www.ruby-forum.com/t/re-news-headline-rss-summary-behavior/101686/2 "2006-08-07T15:15:29Z")

</div>

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](http://dev.radiantcms.org/radiant/wiki/ThirdPartyBehaviors)

–  
John

---

<div class="post-metadata">

**Author:** ![ale](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/f19dbf/32.png) [@ale](https://www.ruby-forum.com/u/ale)\
**Post date:** [August 7, 2006, 4:38pm UTC](https://www.ruby-forum.com/t/re-news-headline-rss-summary-behavior/101686/3 "2006-08-07T16:38:39Z")

</div>

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](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! 🙂

---

<div class="post-metadata">

**Author:** ![ale](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/f19dbf/32.png) [@ale](https://www.ruby-forum.com/u/ale)\
**Post date:** [September 26, 2006, 9:49am UTC](https://www.ruby-forum.com/t/re-news-headline-rss-summary-behavior/101686/4 "2006-09-26T09:49:50Z")

</div>

On 26/09/06, Bryan [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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/](http://radiantcms.org/blog/2006/09/14/how-to-create-global-tags-in-a-plugin/)

–  
Regards,  
Dave

---

<div class="post-metadata">

**Author:** ![ale](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/f19dbf/32.png) [@ale](https://www.ruby-forum.com/u/ale)\
**Post date:** [September 26, 2006, 9:51am UTC](https://www.ruby-forum.com/t/re-news-headline-rss-summary-behavior/101686/5 "2006-09-26T09:51:52Z")

</div>

> 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/](http://radiantcms.org/blog/2006/09/14/how-to-create-global-tags-in-a-plugin/)

---

<div class="post-metadata">

**Author:** ![ale](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/f19dbf/32.png) [@ale](https://www.ruby-forum.com/u/ale)\
**Post date:** [September 26, 2006, 6:13am UTC](https://www.ruby-forum.com/t/re-news-headline-rss-summary-behavior/101686/6 "2006-09-26T06:13:13Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ale](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/f19dbf/32.png) [@ale](https://www.ruby-forum.com/u/ale)\
**Post date:** [October 2, 2006, 3:06am UTC](https://www.ruby-forum.com/t/re-news-headline-rss-summary-behavior/101686/7 "2006-10-02T03:06:03Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ale](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/f19dbf/32.png) [@ale](https://www.ruby-forum.com/u/ale)\
**Post date:** [October 3, 2006, 7:11am UTC](https://www.ruby-forum.com/t/re-news-headline-rss-summary-behavior/101686/8 "2006-10-03T07:11:30Z")

</div>

Thanks, that did the trick!

---

<div class="post-metadata">

**Author:** ![ale](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/f19dbf/32.png) [@ale](https://www.ruby-forum.com/u/ale)\
**Post date:** [October 2, 2006, 2:34pm UTC](https://www.ruby-forum.com/t/re-news-headline-rss-summary-behavior/101686/9 "2006-10-02T14:34:49Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ale](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/f19dbf/32.png) [@ale](https://www.ruby-forum.com/u/ale)\
**Post date:** [October 19, 2006, 3:12am UTC](https://www.ruby-forum.com/t/re-news-headline-rss-summary-behavior/101686/10 "2006-10-19T03:12:29Z")

</div>

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 ☹

---

<div class="post-metadata">

**Author:** ![ale](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/f19dbf/32.png) [@ale](https://www.ruby-forum.com/u/ale)\
**Post date:** [October 20, 2006, 11:03pm UTC](https://www.ruby-forum.com/t/re-news-headline-rss-summary-behavior/101686/11 "2006-10-20T23:03:15Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ale](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/f19dbf/32.png) [@ale](https://www.ruby-forum.com/u/ale)\
**Post date:** [October 22, 2006, 9:57am UTC](https://www.ruby-forum.com/t/re-news-headline-rss-summary-behavior/101686/12 "2006-10-22T09:57:59Z")

</div>

[http://home.gna.org/ruby-feedparser/](http://home.gna.org/ruby-feedparser/)

there appears to be a .gem here:

[http://download.gna.org/ruby-feedparser/](http://download.gna.org/ruby-feedparser/)

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

-jamie
