rss

A super simple RSS feed builder


License
MIT

Documentation

elixir-rss

Simple RSS feed builder for Elixir

Build Status Package

Installing

To add rss to your mix project dependencies just edit your mix.exs

defp deps do
  [ # your other dependencies (hint: mind the commas)
   { :rss, "~> 0.2.1" }
  ]
end

and to download and compile it run:

mix do deps.get, compile

Usage

RSS provides 3 simple functions for building RSS feeds

To create the channel section, use RSS.channel/5

channel = RSS.channel("Title", "http://link.to.site", "Description", "Date in RFC 882 format", "lang (en-us)")

You only need to do this once. From here on in, you can create items using RSS.item/5.

item = RSS.item("Title", "Description", "Date in RFC 882 format", "http://link.to.site/post", "guid-1234-aa"

Once you have a list of items, in a variable names items perhaps, you can build the full feed by using RSS.feed/2

feed = RSS.feed(channel, items)

Links

Research for the feed format came from this blog post