Hckr
Browse Hackernews from the command line. Or get some JSON.
Installation
Add this line to your application's Gemfile:
gem 'hckr'
And then execute:
$ bundle
Or install it yourself as:
$ gem install hckr
Usage
Via CLI
Run hckr
Options
-
home,-hor--homereturns links from the HN home page -
show,-sor--showreturns links from the Show HN page -
jobs,-jor--jobsreturns links from the jobs section -
newest,-nor--newestreturns links from the newest section -
best,-bor--bestreturns links from the best section -
helpor--helpsends help
When ran without any arguments, returns links from the home page.
Return JSON
You can call the Hckr::JsonBuilder like:
Hckr::JsonBuilder.new(page: :jobs).build!which will return a JSON of the jobs HN page.
Contributing
- Fork it ( http://github.com/fteem/hckr/fork )
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create new Pull Request