GithubHelp home page GithubHelp logo

elixir-feed-parser's Introduction

Elixir Feed Parser

Build Status Module Version Hex Docs Total Download License Last Updated

Elixir Atom/RSS Parser. Depends on Erlang's xmerl xml parser.

It is basically a port of the excellent Ruby Feed Jira gem.

Supports specifically Feedburner Atom/RSS2 feeds, iTunes Podcast and Google Docs feeds.

Setup

Add :elixir-feed-parser to your mix dependencies and application.

def application do
  [applications: [:"elixir_feed_parser"]]
end

defp deps do
  [{:"elixir_feed_parser", "~> 0.0.1"}]
end

Then run mix deps.get to install it.

Parsing feeds

feed = ElixirFeedParser.parse(xml_string)
title = feed.title

The feed map provides the following properties which is a normalization based on the Atom and RSS2 standards. Whenever an attribute is normalized the original attribute is provided with a corresponding namespace.

For example the url attribute is actually a link element as defined by the RSS2 standard, therefore we additionally expose the rss2:link attribute.

List of feed properties

  • title
  • id (a unique identifier)
  • description
  • url
  • links (array of strings)
  • feed_url (the canonical link to the feed)
  • updated (most recent update)
  • authors
  • language
  • icon
  • logo
  • copyright
  • generator
  • categories (an array of strings)

List of article properties

  • title
  • id (a unique identifier)
  • description
  • url
  • links (array of strings)
  • updated (most recent update)
  • published
  • authors
  • categories (an array of strings)
  • source

Contribute

I appreciate any contribution to elixir-feed-parser. Open a pull request or file issues if you got feedback!

I'm new to Elixir and would love to get some feedback on how to improve this codebase.

Credits

Since this is my first Elixir project I've taken lots of ideas from existing projects. In particular I'd like to mention FeederEx, Feedme and Quinn.

License

This source code is released under the MIT License. Copyright (c) 2015-present Frederik Dietz and contributors.

elixir-feed-parser's People

Contributors

andyl avatar eahanson avatar fdietz avatar jmn avatar kianmeng avatar praveenperera avatar wstrinz avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.