0.0
Low commit activity in last 3 years
No release in over a year
A gem for creating RSS feeds
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 0.2, >= 0.2.0
~> 0.2, >= 0.2.1
 Project Readme

What's new in the RSS_creator gem version 0.2.2

require 'rss_creator'

rss = RSScreator.new 'feed.rss'

item = {
  title: 'Monday: windy in the morning', 
  link: 'http://www.yourwebsite.com/2015/oct/26/',
  description: 'In the east of Edinburgh, wind is expected in the ' + \
                      'morning with a minimum temperature of 9 degrees Celcius'
}

rss.add item

rss.save

Output:

<?xml version='1.0' encoding='UTF-8'?>
<rss version='2.0'>
  <channel>
    <title>The Edinburgh Weather forecast feed</title>
    <description>Weather data fetched from forecast.io</description>
    <item>
      <title>Monday: windy in the morning</title>
      <description>In the east of Edinburgh, wind is expected in the morning wit
h a minimum temperature of 9 degrees Celcius</description>
      <link>http://www.yourwebsite.com/2015/oct/26/</link>
      <pubDate>Sun, 25 Oct 2015 10:16:00 +0000</pubDate>
    </item>
    <item>
      <title>Sunday: Drizzle in the morning</title>
      <description>In the east of Edinburgh, drizzle is expected in the morning 
with a minimum temperature of 6 degrees Celcius</description>
      <link>http://www.yourwebsite.com/2015/oct/25/#8am</link>
      <pubDate>Sun, 24 Oct 2015 09:21:21 +0000</pubDate>
    </item>
  </channel>
</rss>

As you can see above, in this version of the RSS_creator gem an existing RSS file be opened and an entry appended to it. Notice the latest entry appears at the top.


Introducing the RSS_creator gem

require 'rss_creator'

rss = RSScreator.new

rss.title = 'The Edinburgh Weather forecast feed'
rss.desc = 'Weather data fetched from forecast.io'

item = {
  title: 'Tuesday: Drizzle in the morning', 
  link: 'http://www.yourwebsite.com/2015/oct/24/#8am',
  description: 'In the east of Edinburgh, drizzle is expected in the ' + \
                      'morning with a minimum temperature of 6 degrees Celcius'
}
rss.add item
rss.save 'feed.rss'

Output:

<?xml version='1.0' encoding='UTF-8'?>
<rss version='2.0'>
  <channel>
    <title>The Edinburgh Weather forecast feed</title>
    <description>Weather data fetched from forecast.io</description>
    <item>
      <title>Tuesday: Drizzle in the morning</title>
      <description>In the east of Edinburgh, drizzle is expected in the morning 
with a minimum temperature of 6 degrees Celcius</description>
      <link>http://www.yourwebsite.com/2015/oct/24/#8am</link>
      <pubDate>Sat, 24 Oct 2015 22:40:10 +0100</pubDate>
    </item>
  </channel>
</rss>

Resources

rss_creator rss dynarex gem