https://github.com/fteem/hckr
Browse HN via CLI. Or get some JSON love.
https://github.com/fteem/hckr
Last synced: 25 days ago
JSON representation
Browse HN via CLI. Or get some JSON love.
- Host: GitHub
- URL: https://github.com/fteem/hckr
- Owner: fteem
- License: mit
- Created: 2014-08-01T00:14:46.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2014-08-01T00:41:11.000Z (almost 12 years ago)
- Last Synced: 2025-10-07T20:31:48.557Z (8 months ago)
- Language: Ruby
- Homepage:
- Size: 164 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# 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```, ```-h``` or ```--home``` returns links from the HN home page
* ```show```, ```-s``` or ```--show``` returns links from the Show HN page
* ```jobs```, ```-j``` or ```--jobs``` returns links from the jobs section
* ```newest```, ```-n``` or ```--newest``` returns links from the newest section
* ```best```, ```-b``` or ```--best``` returns links from the best section
* ```help``` or ```--help``` sends help
When ran without any arguments, returns links from the home page.
### Return JSON
You can call the ```Hckr::JsonBuilder``` like:
```ruby
Hckr::JsonBuilder.new(page: :jobs).build!
```
which will return a JSON of the jobs HN page.
## Contributing
1. Fork it ( http://github.com/fteem/hckr/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request