diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 7d3a47b..0000000 --- a/.travis.yml +++ /dev/null @@ -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 diff --git a/README.md b/README.md index 383ca70..733eb61 100644 --- a/README.md +++ b/README.md @@ -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 +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 ``` diff --git a/gulpfile.js b/gulpfile.js deleted file mode 100644 index f2c5e25..0000000 --- a/gulpfile.js +++ /dev/null @@ -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']); diff --git a/package.json b/package.json index 2f12432..76ac9c6 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,9 @@ { - "name": "nprone-raspi", - "version": "1.0.1", - "description": "A NPR One client for the Raspberry Pi", + "name": "npr-one", + "version": "1.0.7", + "description": "A NPR One command line client", "main": "index.js", - "scripts": { - "test": "gulp" - }, + "bin": "index.js", "repository": { "type": "git", "url": "git+https://github.com/adafruit/nprone_raspi.git" @@ -14,6 +12,7 @@ "npr", "one", "radio", + "cli", "raspberry", "pi", "raspi", @@ -21,24 +20,23 @@ ], "author": "Todd Treece ", "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": { - "bunyan": "^1.4.0", - "chalk": "^1.1.0", + "chalk": "^1.1.3", "dotenv": "^1.2.0", "es6-shim": "^0.32.2", + "gauge": "^2.2.1", "inquirer": "^0.9.0", - "node-omx": "^0.2.1", - "swagger-client": "^2.1.2", - "wget-improved": "^1.1.1" + "keypress": "^0.2.1", + "mplayer": "^2.0.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" } }