README.md in html2rss-0.3.0 vs README.md in html2rss-0.3.1
- old
+ new
@@ -15,9 +15,22 @@
## Installation
Add this line to your application's Gemfile: `gem 'html2rss'`
And then execute: `bundle`
+```ruby
+rss = Html2rss.feed(
+ channel: { name: 'StackOverflow: Hot Network Questions', url: 'https://stackoverflow.com' },
+ selectors: {
+ items: { selector: '#hot-network-questions > ul > li' },
+ title: { selector: 'a' },
+ link: { selector: 'a', extractor: 'href' }
+ }
+)
+
+puts rss.to_s
+```
+
## Usage with a YAML config file
Create a YAML config file. Find an example at [`rspec/config.test.yml`](https://github.com/gildesmarais/html2rss/blob/master/spec/config.test.yml).
`Html2rss.feed_from_yaml_config(File.join(['spec', 'config.test.yml']), 'nuxt-releases')` returns