##Description Simple Dashing widget (and associated job) to display RSS feeds. Based on Iaian Mitchell's News widget.
##Dependencies nokogiri
Add it to dashing's gemfile:
gem 'nokogiri'
gem 'htmlentities'
and run bundle install
.
##Usage To use this widget, copy news.html, news.coffee, and news.scss into the /widgets/news directory. Put the news.rb file in your /jobs folder.
To include the widget in a dashboard, add the following snippet to the dashboard layout file:
<li data-row="1" data-col="1" data-sizex="1" data-sizey="1">
<div data-id="seattle-times" data-view="News" data-title="Seattle Times" data-interval="30"></div>
</li>
At the top of the news.rb job file, add any rss feed urls you want fetched to the hash, and the widget id to send data to. In the dashboard layout file, the optional data-interval
binding can be used to specify how frequently to rotate the news items.
Dear Todd,
thanks a lot for this great widget. I know, it is pritty unusual: How would one load an RSS-feed, that requires username and password? I tried
news_feeds = {
"feed" => "https://username:[email protected]/feed.xml",
}
That works pretty well in firefox but in this context, it doesn't. The feed is provided by a joomla site, that contains internal information for our organization....
Best regards
Luke