Skip to content

patrickbrown-dev/diane

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Diane Build Status

RSS/Atom parser for Elixir.

⚠️ Atom feed parsing is not functional at this time. ⚠️

Installation

Add {:diane, "~> 0.0.1"} to your mix.exs deps.

Use

raw_xml = "..." # Feed in raw string form.
{:ok, feed} = Diane.parse(raw_xml)

channel = feed.channels |> List.first
channel.title
# xkcd.com

channel.description
# xkcd.com: A webcomic of romance and math humor.

channel.items |> Enum.map(fn(item) -> item.title end)
# ['Keyboard Mash', 'Vodka', ...]

TODO

  • RSS 2.0 feed parsing
  • RSS 1.x feed parsing
  • Atom feed parsing
  • Logic to determine what kind of feed to parse.

Goals

  1. 100% Elixir RSS/Atom parser.
  2. Super fast.
  3. Adhere to RSS/Atom specs.
  4. RSS Spec
  5. Atom Spec