https://github.com/timstott/hackernews
Output top Hacker News posts to STDOUT as JSON
https://github.com/timstott/hackernews
Last synced: 2 months ago
JSON representation
Output top Hacker News posts to STDOUT as JSON
- Host: GitHub
- URL: https://github.com/timstott/hackernews
- Owner: timstott
- Created: 2017-02-27T00:51:39.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-02-27T14:05:43.000Z (over 9 years ago)
- Last Synced: 2025-10-26T01:41:27.070Z (8 months ago)
- Language: JavaScript
- Size: 20.5 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Hacker News to JSON
Output top Hacker News posts to STDOUT as JSON
## Installation
Requirements
- NodeJS >= 6
- npm >= 3.10
```
git clone git://github.com/timstott/hackernews.git && cd hackernews
npm install
npm install -g
```
## Usage
```
hackernews --posts 3
[ { author: 'kawera',
comments: 84,
points: 309,
rank: 1,
title: 'Annotation is now a web standard',
uri: 'https://hypothes.is/blog/annotation-is-now-a-web-standard/' },
{ author: 'ayanai',
comments: 29,
points: 60,
rank: 2,
title: 'Saudi Arabia\'s Oil Wealth Is About to Get a Reality Check',
uri: 'https://www.bloomberg.com/news/articles/2017-02-23/saudi-arabia-2-trillion-aramco-vision-runs-into-market-reality' },
{ author: 'Tiktaalik',
comments: 70,
points: 127,
rank: 3,
title: 'Popularity of Sony’s PlayStation VR Surprises Even the Company',
uri: 'https://www.nytimes.com/2017/02/26/business/sony-playstation-vr-sales.html' } ]
```
## Roadmap
- Logging
## Dependencies
- Cheerio to parse and select HTML elements
- Minimist to parse arguments passed
- Lodash to compensate for the missing sequence operations in JavaScript stdlib