An open API service indexing awesome lists of open source software.

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

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