README.md in html2rss-0.12.0 vs README.md in html2rss-0.13.0

- old
+ new

@@ -24,30 +24,44 @@ | Then execute: | `bundle` | | In your code: | `require 'html2rss'` | ## Generating a feed on the CLI -Create a file called `my_config_file.yml` with this example content: +### using automatic scraping +html2rss offers an automatic scrapting feature. Try it with: + +`html2rss auto https://unmatchedstyle.com/` + +### creating a feed config file and using it + +If the results are not to your satisfaction, you can create a feed config file. + +Create a file called `my_config_file.yml` with this sample content: + ```yml channel: - url: https://stackoverflow.com/questions + url: https://unmatchedstyle.com selectors: items: - selector: "#hot-network-questions > ul > li" + selector: "article[id^='post-']" title: - selector: a + selector: h2 link: selector: a extractor: href + description: + selector: ".post-content" + post_process: + - name: sanitize_html ``` -Build the RSS with: `html2rss feed ./my_config_file.yml`. +Build the feed from this config with: `html2rss feed ./my_config_file.yml`. ## Generating a feed with Ruby -Here's a minimal working example in Ruby: +Here's a minimal working example using Ruby: ```ruby require 'html2rss' rss = @@ -479,11 +493,11 @@ selectors: ``` Your feed configs go below `feeds`. Everything else is part of the global config. -Find a full example of a `feeds.yml` at [`spec/feeds.test.yml`](https://github.com/html2rss/html2rss/blob/master/spec/feeds.test.yml). +Find a full example of a `feeds.yml` at [`spec/fixtures/feeds.test.yml`](https://github.com/html2rss/html2rss/blob/master/spec/fixtures/feeds.test.yml). Now you can build your feeds like this: <details> <summary>Build feeds in Ruby</summary> @@ -581,10 +595,24 @@ - Fiddling with [`curl`](https://github.com/curl/curl) and [`pup`](https://github.com/ericchiang/pup) to find the selectors seems efficient (`curl URL | pup`). - [CSS selectors are versatile. Here's an overview.](https://www.w3.org/TR/selectors-4/#overview) ### Contributing -1. Fork it ( <https://github.com/html2rss/html2rss/fork> ) +Find ideas what to contribute in: + +1. <https://github.com/orgs/html2rss/discussions> +2. the issues tracker: <https://github.com/html2rss/html2rss/issues> + +#### Development Helpers + +1. `bin/setup`: installs dependencies and sets up the development environment. +2. `bin/guard`: automatically runs rspec, rubocop and reek when a file changes. +3. for a modern Ruby development experience: install [`ruby-lsp`](https://github.com/Shopify/ruby-lsp) and integrate it to your IDE: + a. [Ruby in Visual Studio Code](https://code.visualstudio.com/docs/languages/ruby) + +#### How to submit changes + +1. Fork this repo ( <https://github.com/html2rss/html2rss/fork> ) 2. Create your feature branch (`git checkout -b my-new-feature`) -3. Commit your changes (`git commit -am 'Add some feature'`) +3. Implement a commit your changes (`git commit -am 'feat: add XYZ'`) 4. Push to the branch (`git push origin my-new-feature`) -5. Create a new Pull Request +5. Create a new Pull Request using the Github web UI