Sources of headlines and fetcher code for various news sources.
-
Fork this repository.
-
Clone it to your computer.
-
Install dependencies with Bundler.
If you don't have Bundler installed, try
gem install bundler
orsudo gem install bundler
to install it.Once you have bundler, just
cd
to your download path, and runbundle
. -
Look in
lib/headline_sources/fetchers
to see some example fetchers. Copy one that looks good or create your own. We'll try to determine your class name based on the filename by callingcamelize
on it, so make sure it's named correctly. (For example if your file is namednewsblog_fetcher
your class should be namedNewsblogFetcher
). -
Add a favicon from the site to
app/assets/images/headline_sources/newsblog.png
. -
Add the full site name and a category to
db/sources.yml
. -
Fetch some headlines with
bin/headline-sources fetch newsblog
. -
Commit your changes and headlines and open a pull request.
Clone the repo, then run bin/headline-sources batch
. This will update all the sources in sequence.