Git Product home page Git Product logo

swiftrss's Introduction

SwiftRSS Build Status

SwiftRSS is a simple RSS parser written in Swift.

Todo

  • Basic RSS Support
  • Handle internet dates (RFC822 & RFC3339)
  • Tests with several RSS feeds (Swift official blog, Wordpress, Tumblr)
  • Handle Feed headers
  • NSCoder compatibility
  • Handle Comment link, feed and count (specific to Wordpress)
  • Add images helper (an array of images URL like for BlockRSSParser)
  • Continuous integration
  • Cocoapods spec (waiting for Cocoapods Swift support)

Installation

The project will be available as a Pod as soon as Cocoapods will release the Swift support.

For now you can install this module manualy : Copy the content of the SwiftRSS folder and add it to your project.

You can also use this project as Git submodule.

Usage

This library is pretty simple to use. All you need to do is to create a simple NSURLRequest with the URL of your feed and then use the parseFeedForRequest() method with the callback closure to be able to use your items or handle errors properly.

let request: NSURLRequest = NSURLRequest(URL: NSURL(string: http://developer.apple.com/swift/blog/news.rss))

RSSParser.parseFeedForRequest(request, callback: { (feed, error) -> Void in
  NSLog("Feed for : \(feed.title)")
  NSLog("contains : \(feed.items)")
})

As results you get a RSSFeed object which contain a array of RSSItems or, if something wrong happen the NSError which will give you the error from the network call or the parsing process.

How to contribute

If you need help on how to setup this project or how to use it, please use Stack Overflow.

If you notice a bug, please open an issue with all the details and code to reproduce this issue.

If you want to contribute to the project, fix something or add a feature please fork this project, work in a seperate branch, and send a pull request. Also please consider the following section about custom feeds and specific usecases

Custom feeds and specific usecases

This project is made to be a really simple RSS Parser for a basic news feed. You may need to parse more nodes if you want to use it with a custom feed (iTunes feed for instance). With BlockRSSParser I used to say that this kind of usage isn't really related to the originial philosophy of the project.

Now I think the best thing to do is to move these special use case to seperate branches.

If you want to adapt this project to a specific usecase, please fork the project, create a new branch named explicitly and send a pull request.

Credits

Maintainers :

Code review:

Special thanks to :

Licence

SwiftRSS is released under the MIT license. See LICENSE for details.

swiftrss's People

Contributors

tibo avatar lukas-z7 avatar

Watchers

Timo Uhlmann avatar James Cloos 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.