RSS/Atom parser written in swift.
import Muon
let myRSSFeed = try! String(contentsOf: URL(string: "https://example.com/feed.rss")!)
let parser = FeedParser(string: myRSSFeed)
parser.success {
print("Parsed: \($0)")
}
parser.failure {
print("Failed to parse: \($0)")
}
parser.main() // or add to an OperationQueue
- add `github "younata/Muon" "1.0"
Make sure that use_frameworks!
is defined in your Podfile
- add
pod "Muon", :git => "https://github.com/younata/Muon.git"
- Drop support for swift < 5.0
- String extensions are no longer public.
- Drop support for swift < 4.0
- Clean up internal representations based off much newer swift features (this codebase predates swift 1.0!)
- Better handle how FeedParserError handles other error types.
- Swift 4.0 is supported
- FeedParser now guarantees that errors will always be of type
FeedParserError
(non-FeedParserErrors will be (poorly) wrapped in aFeedParserError
).
- Swift 3.0
- Model objects now import Foundation
- Make Muon models (Feed, Article, Author, Enclosure) into structs
- Articles now have mostly non-optional properties (going away from the pure RSS/Atom specs to be more opinionated).
- Swift 2.0 Compatibility
- Enabled for use in extensions
- Not obj-c compatible anymore (sorry)
- Less strict on parsing feeds
- Enabled bitcode
- Last Swift 1.2 release
- Add objc support
- Enable whole module optimization
- Make FeedParser more injector-friendly
- Makes Public initializers for Feed and Article
- Initial support for RSS 1.0, RSS 2.0, and Atom feeds