{"id":13878128,"url":"https://github.com/ruby/rss","last_synced_at":"2025-05-15T08:00:20.990Z","repository":{"id":33649511,"uuid":"135525201","full_name":"ruby/rss","owner":"ruby","description":"RSS reading and writing","archived":false,"fork":false,"pushed_at":"2024-08-21T06:21:26.000Z","size":654,"stargazers_count":188,"open_issues_count":9,"forks_count":35,"subscribers_count":44,"default_branch":"master","last_synced_at":"2025-04-11T15:57:14.750Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ruby.png","metadata":{"files":{"readme":"README.md","changelog":"NEWS.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-05-31T03:10:57.000Z","updated_at":"2025-04-08T14:24:48.000Z","dependencies_parsed_at":"2024-01-30T04:21:33.415Z","dependency_job_id":"59d40173-b9ce-46c8-8d13-17c12b6a5fd7","html_url":"https://github.com/ruby/rss","commit_stats":{"total_commits":271,"total_committers":41,"mean_commits":6.609756097560975,"dds":0.5756457564575646,"last_synced_commit":"7accfa3c3d87af45179fe98297346247b27c26ac"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruby%2Frss","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruby%2Frss/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruby%2Frss/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruby%2Frss/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ruby","download_url":"https://codeload.github.com/ruby/rss/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254301420,"owners_count":22047901,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-06T08:01:40.604Z","updated_at":"2025-05-15T08:00:20.298Z","avatar_url":"https://github.com/ruby.png","language":"Ruby","readme":"# RSS\n\nReally Simple Syndication (RSS) is a family of formats that describe _feeds_, specially constructed XML documents that allow an interested person to subscribe and receive updates from a particular web service. This portion of the standard library provides tooling to read and create these feeds.\n\nThe standard library supports RSS 0.91, 1.0, 2.0, and Atom, a related format. Here are some links to the standards documents for these formats:\n\n* RSS\n  * [0.9.1](http://www.rssboard.org/rss-0-9-1-netscape)\n  * [1.0](http://web.resource.org/rss/1.0/)\n  * [2.0](http://www.rssboard.org/rss-specification)\n* [Atom](https://tools.ietf.org/html/rfc4287)\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'rss'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install rss\n\n## Usage\n\n### Consuming RSS\n\nIf you'd like to read someone's RSS feed with your Ruby code, you've come to the right place. It's really easy to do this, but we'll need the help of open-uri:\n\n```ruby\n  require 'rss'\n  require 'open-uri'\n\n  url = 'https://www.ruby-lang.org/en/feeds/news.rss'\n  URI.open(url) do |rss|\n    feed = RSS::Parser.parse(rss)\n    puts \"Title: #{feed.channel.title}\"\n    feed.items.each do |item|\n      puts \"Item: #{item.title}\"\n    end\n  end\n```\n\nAs you can see, the workhorse is RSS::Parser#parse, which takes the source of the feed and a parameter that performs validation on the feed. We get back an object that has all of the data from our feed, accessible through methods. This example shows getting the title out of the channel element, and looping through the list of items.\n\n### Producing RSS\n\nProducing our own RSS feeds is easy as well. Let's make a very basic feed:\n\n```ruby\n  require \"rss\"\n\n  rss = RSS::Maker.make(\"atom\") do |maker|\n    maker.channel.author = \"matz\"\n    maker.channel.updated = Time.now.to_s\n    maker.channel.about = \"https://www.ruby-lang.org/en/feeds/news.rss\"\n    maker.channel.title = \"Example Feed\"\n\n    maker.items.new_item do |item|\n      item.link = \"https://www.ruby-lang.org/en/news/2010/12/25/ruby-1-9-2-p136-is-released/\"\n      item.title = \"Ruby 1.9.2-p136 is released\"\n      item.updated = Time.now.to_s\n    end\n  end\n\n  puts rss\n```\n\nAs you can see, this is a very Builder-like DSL. This code will spit out an Atom feed with one item. If we needed a second item, we'd make another block with maker.items.new_item and build a second one.\n\n## Development\n\nAfter checking out the repo, run `rake test` to run the tests.\n\nTo install this gem onto your local machine, run `rake install`. To release a new version, update the version number in `lib/rss/version.rb`, and then run `rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/ruby/rss.\n\n## License\n\nThe gem is available as open source under the terms of the [BSD-2-Clause](LICENSE.txt).\n","funding_links":[],"categories":["Ruby"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruby%2Frss","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fruby%2Frss","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruby%2Frss/lists"}