update readme & package.json to reflect new commands

This commit is contained in:
Todd Treece 2016-05-17 17:39:33 -04:00
parent 5a44ba00ca
commit 08e6afa682
4 changed files with 78 additions and 81 deletions

View file

@ -1,9 +0,0 @@
language: node_js
node_js:
- '0.12'
before_script:
- npm install -g gulp
notifications:
email:
on_success: change
on_failure: change

View file

@ -1,9 +1,65 @@
# NPR One Raspberry Pi Radio [![Build Status](https://travis-ci.org/adafruit/nprone_raspi.svg?branch=master)](https://travis-ci.org/adafruit/nprone_raspi) # NPR One CLI
This project uses the NPR One API to create a standalone NPR One streaming radio using a Raspberry Pi. This is a simple command line based NPR One client for OS X and Linux.
## Installation ## Installation
Install `mplayer` on OS X using [homebrew](http://brew.sh/):
``` ```
npm install ¯\_(ツ)_/¯ $ brew install mplayer
```
Install `mplayer` on Linux:
```
$ sudo apt-get install -y mplayer
```
Make sure you have the latest stable [node.js](https://nodejs.org/en/) installed (4.0 or higher), and then run:
```
npm install -g npr-one
```
## Usage
Sign into the [NPR Dev Console](http://dev.npr.org/) and enter your App ID & Secret. The audio player
will save your authorization and begin playing.
```
$ npr-one
\\\\\\\\\\\\\\\\\\\\\\\\\\\>>>>>>>>>>>>>>>>>>>>>>>>>> \\\\\\\\\\\\\\\\\\\\\\\\\\
\\\\\\\\\\\\\\\\\\\\\\\\\\\>>>>>>>>>>>>>>>>>>>>>>>>>> \\\\\\\\\\\\\\\\\\\\\\\\\\
\\\\\\\\\\\\\>>\\\\\\\\\\\\>>>>>>>>>>>>>>>>>>>>>>>>>> \\\\\\\\\\\\\\>>>\\\\\\\\\
\\\\\\\ >\\\\\\\\>>>>>>> \>>>>>>>> \\\\\\\\ (\\\\\\\\
\\\\\\\ .>>>>= \\\\\\\\>>>>>>> =>>>> >>>>>>> \\\\\\\\ (>>>>\\\\\\\\\
\\\\\\\ )\\\\\ (\\\\\\\>>>>>>> >>>>>> )>>>>>> \\\\\\\\ .\\\\\\\\\\\\\\
\\\\\\\ )\\\\\ (\\\\\\\>>>>>>> >>>>>> )>>>>>> \\\\\\\\ )\\\\\\\\\\\\\\
\\\\\\\ )\\\\\ (\\\\\\\>>>>>>> >>>>>\ >>>>>>> \\\\\\\\ )\\\\\\\\\\\\\\
\\\\\\\ )\\\\\ (\\\\\\\>>>>>>> ->>>>>>>> \\\\\\\\ )\\\\\\\\\\\\\\
\\\\\\\>>>>\\\\\>>>>\\\\\\\>>>>>>> >>>>(>>>>>>>>>>> \\\\\\\\>>>>\\\\\\\\\\\\\\
\\\\\\\\\\\\\\\\\\\\\\\\\\\>>>>>>> >>>>>>>>>>>>>>>> \\\\\\\\\\\\\\\\\\\\\\\\\\
\\\\\\\\\\\\\\\\\\\\\\\\\\\>>>>>>>===>>>>>>>>>>>>>>>> \\\\\\\\\\\\\\\\\\\\\\\\\\
[downloaded] WYPR FM
[downloaded] NPR thanks our sponsors
[playing] WYPR FM
[downloaded] Welcome To Czechia: Czech Republic Looks To Adopt Shorter Name
[downloaded] Belgian Transport Minister Resigns Over Airport Security Debate
[downloaded] Tax Season
[downloaded] Adapting To A More Extreme Climate, Coastal Cities Get Creative
[downloaded] NPR thanks our sponsors
```
### Keyboard Controls
```
space play/pause
↑ volume up
↓ volume down
← rewind 15 seconds
→ skip to the next story
i mark as interesting
``` ```

View file

@ -1,48 +0,0 @@
require('dotenv').load();
var gulp = require('gulp'),
jshint = require('gulp-jshint'),
mocha = require('gulp-mocha');
gulp.task('lint', function() {
var lint = jshint({
"curly": false,
"eqeqeq": true,
"immed": true,
"latedef": "nofunc",
"newcap": false,
"noarg": true,
"sub": true,
"undef": false,
"unused": "var",
"boss": true,
"eqnull": true,
"node": true,
"-W086": true
});
return gulp.src([
'index.js',
'lib/*.js',
'test/*.js'
]).pipe(lint)
.pipe(jshint.reporter('jshint-stylish'));
});
gulp.task('test', function() {
return gulp.src('test/*.js', {read: false})
.pipe(mocha())
.once('error', function(err) {
console.error(err);
process.exit(1);
})
.once('end', function() {
process.exit();
});
});
gulp.task('default', ['lint']);

View file

@ -1,11 +1,9 @@
{ {
"name": "nprone-raspi", "name": "npr-one",
"version": "1.0.1", "version": "1.0.7",
"description": "A NPR One client for the Raspberry Pi", "description": "A NPR One command line client",
"main": "index.js", "main": "index.js",
"scripts": { "bin": "index.js",
"test": "gulp"
},
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git+https://github.com/adafruit/nprone_raspi.git" "url": "git+https://github.com/adafruit/nprone_raspi.git"
@ -14,6 +12,7 @@
"npr", "npr",
"one", "one",
"radio", "radio",
"cli",
"raspberry", "raspberry",
"pi", "pi",
"raspi", "raspi",
@ -21,24 +20,23 @@
], ],
"author": "Todd Treece <todd@uniontownlabs.org>", "author": "Todd Treece <todd@uniontownlabs.org>",
"license": "MIT", "license": "MIT",
"bugs": {
"url": "https://github.com/adafruit/nprone_raspi/issues"
},
"homepage": "https://github.com/adafruit/nprone_raspi#readme",
"devDependencies": {
"gulp": "^3.9.0",
"gulp-jshint": "^1.11.2",
"gulp-mocha": "^2.1.3",
"jshint-stylish": "^2.0.1"
},
"dependencies": { "dependencies": {
"bunyan": "^1.4.0", "chalk": "^1.1.3",
"chalk": "^1.1.0",
"dotenv": "^1.2.0", "dotenv": "^1.2.0",
"es6-shim": "^0.32.2", "es6-shim": "^0.32.2",
"gauge": "^2.2.1",
"inquirer": "^0.9.0", "inquirer": "^0.9.0",
"node-omx": "^0.2.1", "keypress": "^0.2.1",
"swagger-client": "^2.1.2", "mplayer": "^2.0.1",
"wget-improved": "^1.1.1" "node-mplayer": "0.0.6",
"npmlog": "^2.0.3",
"npr-api": "^1.1.2",
"rimraf": "^2.5.2",
"string": "^3.3.1",
"touch": "^1.0.0",
"wget-improved": "^1.3.0"
},
"optionalDependencies": {
"mpr121": "0.0.5"
} }
} }