summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorprzemyslawpluta <przemekpluta@hotmail.com>2014-04-17 19:07:33 +0100
committerprzemyslawpluta <przemekpluta@hotmail.com>2014-04-17 19:07:33 +0100
commitc8cde5a83e83d1278b136f2369567adce76c4ae9 (patch)
tree5ed3c7eae28e3e051c187f2f00b048f56a0be330
parenteb3a77b742a5c4dbf9dde07d0a28cca4aef0cf99 (diff)
downloadmongo-edu-c8cde5a83e83d1278b136f2369567adce76c4ae9.zip
update description
-rw-r--r--mongo-edu.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/mongo-edu.js b/mongo-edu.js
index c1334f3..56bc8b7 100644
--- a/mongo-edu.js
+++ b/mongo-edu.js
@@ -11,21 +11,23 @@ var mdbvideos = require('./lib/login'),
validate = require('./lib/validate'),
colors = require('colors'),
inquirer = require('inquirer'),
- argv = require('optimist')
- .usage('Usage: $0')
+ optimist = require('optimist')
+ .usage('Usage: $0 [options]')
.describe('d', 'download path').describe('u', 'email address')
.describe('h', 'switch from videos (default) to handouts').boolean('h')
.describe('cc', 'get closed captions').boolean('cc')
.describe('hq', 'get high quality videos').boolean('hq')
.describe('ncc', 'no check certificate').boolean('ncc')
.describe('uz', 'unzip file').boolean('uz')
- .demand('d').argv;
+ .demand('d');
exports.create = function start() {
'use strict';
- var lookFor = ((!argv.h)? 'Videos' : 'Handouts');
+ var argv = optimist.argv, lookFor = ((!argv.h)? 'Videos' : 'Handouts');
+
+ if (argv.help) { return optimist.showHelp(); }
validate.init(argv, function (err, profile) {
if (err !== null) { throw err; }