Skip to content

FL4MIN/html2rss-configs

ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

115 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

html2rss logo

html2rss-configs

โœŒ๏ธThis repository contains html2rss feed configs for many websites.
๐Ÿ‘‰Find all feed configs in the configs/ directory.
โ˜๏ธA handy usage method is via html2rss-web.
๐Ÿ’ช Contributions are more than welcome! Fork this repository, add your feed config and create a pull request.

Adding a new feed config

There's a generator for that! ๐Ÿ†’

  1. make config domain=domainname.tld name=whatever
    Change domain and name values to desired values.
  2. Head to the generated files and add the selectors and options.
    html2rss's README explains how to build a feed config. Or browse the existing ones for inspiration.
  3. Fetch the feed, run:
    bin/fetch domainname.tld/whatever
    And with dynamic parameters:
    bin/fetch domainname.tld/whatever id=42 foo="bar baz"

Dynamic parameters in channel attributes

Sometimes there are structurally equal pages with different URLs. In such a case you can add variables to the channel's attributes.

In your feed config:

channel:
  url: "http://domainname.tld/whatever/%{id}.html"

See the more complex formatting of the sprintf method for formatting options.

You have to provide the parameters to the spec, too:

include_examples 'config.yml', 'domainname.tld/whatever.yml', id: 42

Programmatic usage:

config = Html2rss::Configs.find_by_name('domainname.tld/whatever', { id: 42 })

Usage

Add to your Gemfile:

gem 'html2rss-configs', git: 'https://github.com/html2rss/html2rss-configs.git'

Use it in your code:

require 'html2rss/configs'

config = Html2rss::Configs.find_by_name('domainname.tld/whatever')

This will return the feed config.

Usage with html2rss-web

If you're running html2rss-web, you have nothing more to do! ๐ŸŽ‰

Building on the CI

Modifying existing or adding new feed configs will trigger the CI to fetch the feed and check for the presence of feed items.

See .travis.yml -> script which commands execute during build.

About

๐Ÿ“‡ A growing collection of html2rss feed configs. Generate configs with the handy generator.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Ruby 95.5%
  • Makefile 4.0%
  • Shell 0.5%