All Projects → feedjira → Feedjira

feedjira / Feedjira

Licence: other
A feed parsing library

Programming Languages

ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to Feedjira

Simplepie
A simple Atom/RSS parsing library for PHP.
Stars: ✭ 1,389 (-31.14%)
Mutual labels:  rss, parser
vue-rss-feed
Embed RSS Feeds in your Vue web app
Stars: ✭ 37 (-98.17%)
Mutual labels:  rss, rss-parser
Rss
Library for serializing the RSS web content syndication format
Stars: ✭ 223 (-88.94%)
Mutual labels:  rss, parser
react-native-rss-parser
React Native compatible package to parse RSS feeds
Stars: ✭ 76 (-96.23%)
Mutual labels:  rss, rss-parser
Picofeed
PHP library to parse and write RSS/Atom feeds
Stars: ✭ 439 (-78.24%)
Mutual labels:  rss, parser
buran
Bidirectional, data-driven RSS/Atom feed consumer, producer and feeds aggregator
Stars: ✭ 27 (-98.66%)
Mutual labels:  rss, rss-parser
tidyRSS
An R package for extracting 'tidy' data frames from RSS, Atom, JSON and geoRSS feeds
Stars: ✭ 62 (-96.93%)
Mutual labels:  rss, rss-parser
Atoma
Atom, RSS and JSON feed parser for Python 3
Stars: ✭ 67 (-96.68%)
Mutual labels:  rss, parser
Gofeed
Parse RSS, Atom and JSON feeds in Go
Stars: ✭ 1,762 (-12.64%)
Mutual labels:  rss, parser
Posidonlauncher
a one-page homescreen with a news feed
Stars: ✭ 163 (-91.92%)
Mutual labels:  rss
Django Planet
🌐 A django planet and feeds (RSS and ATOM) aggregator application for Django
Stars: ✭ 165 (-91.82%)
Mutual labels:  rss
Json To Ast
JSON AST parser
Stars: ✭ 161 (-92.02%)
Mutual labels:  parser
Npeg
PEGs for Nim, another take
Stars: ✭ 163 (-91.92%)
Mutual labels:  parser
Spypi
An (un-)ethical hacking-station based on Raspberry Pi and Python
Stars: ✭ 167 (-91.72%)
Mutual labels:  parser
Mikrotik Hosts Parser
✂️ Mikrotik hosts parser
Stars: ✭ 162 (-91.97%)
Mutual labels:  parser
Node Feedsub
Subscribes to RSS/Atom/JSON feeds and notifies on new items.
Stars: ✭ 170 (-91.57%)
Mutual labels:  rss
Leed
Leed (contraction de Light Feed) est un agrégateur RSS libre et minimaliste qui permet la consultation de flux RSS de manière rapide et non intrusive.
Stars: ✭ 160 (-92.07%)
Mutual labels:  rss
Ink
A fast and flexible Markdown parser written in Swift.
Stars: ✭ 2,049 (+1.59%)
Mutual labels:  parser
Graphql S2s
Add GraphQL Schema support for type inheritance, generic typing, metadata decoration. Transpile the enriched GraphQL string schema into the standard string schema understood by graphql.js and the Apollo server client.
Stars: ✭ 171 (-91.52%)
Mutual labels:  parser
Sv Parser
SystemVerilog parser library fully complient with IEEE 1800-2017
Stars: ✭ 169 (-91.62%)
Mutual labels:  parser

Feedjira

Build Status Code Climate Gitter

Feedjira is a Ruby library designed to parse feeds.

Installation

Add this line to your application's Gemfile:

gem "feedjira"

Parsing

An example of parsing a feed with Feedjira:

xml = HTTParty.get(url).body
feed = Feedjira.parse(xml)
feed.entries.first.title
# => "Announcing version 3.0"

Specifying parser

If you have the XML and just want to provide a parser class for one parse, you can specify that using parse with the parser option:

Feedjira.parse(xml, parser: MyAwesomeParser)

Adding attributes to all feeds types / all entries types

# Add the generator attribute to all feed types
Feedjira::Feed.add_common_feed_element("generator")
xml = HTTParty.get("http://www.pauldix.net/atom.xml").body
Feedjira.parse(xml).generator
# => "TypePad"

Adding attributes to only one class

If you want to add attributes for only one class you simply have to declare them in the class

# Add some GeoRss information
class Feedjira::Parser::RSSEntry
  element "georss:elevation", as: :elevation
end

# Fetch a feed containing GeoRss info and print them
url = "https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/significant_week.atom"
xml = HTTParty.get(url).body
Feedjira.parse(xml).entries.each do |entry|
  puts "Elevation: #{entry.elevation}"
end

Configuration

Parsers

Adding a custom parser

You can insert your own parser at the front of the available parser list by:

Feedjira.configure do |config|
  config.parsers.unshift(MyAwesomeParser)
end

Now when you call Feedjira.parse, MyAwesomeParser will be the first one to get a chance to parse the feed.

Explicitly set all available parsers

Feedjira can be configured to use a specific set of parsers and in a specific order:

Feedjira.configure do |config|
  config.parsers = [
    Feedjira::Parser::ITunesRSS,
    MyAwesomeParser,
    Feedjira::Parser::RSS
  ]
end

Stripping whitespace from XML

Feedjira can be configured to strip all whitespace but defaults to lstrip only:

Feedjira.configure do |config|
  config.strip_whitespace = true
end

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/feedjira/feedjira. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

Projects that use Feedjira

Feedjira is used in some awesome projects around the web - from RSS readers to add-ons and everything in between. Here are some of them:

  • Feedbin: Feedbin bills itself as a fast, simple RSS reader that delivers a great reading experience. It's a paid RSS reader that integrates with mobile apps and it even has a fully featured API!

  • Stringer: Stringer is a self-hosted, anti-social RSS reader. It's an open-source project that's easy to deploy to any host, there's even a one-click button to deploy on Heroku.

  • BlogFeeder: BlogFeeder is a paid Shopify App that makes it easy for you to import any external blog into your Shopify store. It helps improve your store's SEO and keeps your blogs in sync, plus a lot more.

  • Feedbunch: Feedbunch is an open source feed reader built to fill the hole left by Google Reader. It aims to support all features of Google Reader and actually improve on others.

  • The Old Reader: The Old Reader advertises as the ultimate social RSS reader. It's free to start and also has a paid premium version. There's an API and it integrates with many different mobile apps.

  • Solve for All: Solve for All combines search engine and feed parsing while protecting your privacy. It's even extendable by the community!

  • Feedi API: Feedi simplifies how you handle RSS, Atom, or JSON feeds. You can add and keep track of your favourite feed data with a simple and clean REST API. All entries are enriched by Machine Learning and Semantic engines.

  • Breaker: The social podcast app

  • Huginn: Huginn is a system for building agents that perform automated tasks for you online.

Note: to get your project on this list, simply send an email with your project's details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].