diff options
-rw-r--r-- | lib/courseware.js | 1 | ||||
-rw-r--r-- | lib/options.js | 10 | ||||
-rw-r--r-- | mongo-edu.js | 6 | ||||
-rw-r--r-- | package.json | 4 |
4 files changed, 11 insertions, 10 deletions
diff --git a/lib/courseware.js b/lib/courseware.js index 0c47210..8aa0d01 100644 --- a/lib/courseware.js +++ b/lib/courseware.js @@ -12,7 +12,6 @@ var fs = require('fs'), ProgressBar = require('progress'), inquirer = require('inquirer'), colors = require('colors'), - util = require('util'), _ = require('lodash'); var isWin = /^win/.test(process.platform), diff --git a/lib/options.js b/lib/options.js index 1b3fb6b..707beb4 100644 --- a/lib/options.js +++ b/lib/options.js @@ -7,7 +7,6 @@ */ var fs = require('fs'), - path = require('path'), _ = require('lodash'), inquirer = require('inquirer'), Table = require('easy-table'), @@ -122,13 +121,12 @@ function promptAsk(data, argv, initRun) { }); } -function showSign(item, rev) { +function showSign(item) { 'use strict'; if (!item) { return ''; } if (typeof item !== 'boolean') { return item; } - if (!rev) { return (item) ? ' x' : ''; } - return (item) ? '' : ' x'; + return (item) ? ' x' : ''; } function checkIfFilled(item, name, target, clear) { @@ -154,7 +152,7 @@ function showPresets(argv, initRun, checkIfLoad) { items.forEach(function each(item) { t.cell('Preset', presets[count]); t.cell('User', item.u); - t.cell('Wiki List', showSign(item.cw, true)); + t.cell('Wiki List', ((!item.cw && item.h) ? showSign(item.cw) : showSign(!item.cw))); t.cell('Courseware', showSign(item.cw)); t.cell('HQ Video', showSign(item.hq)); t.cell('CC', showSign(item.cc)); @@ -192,7 +190,7 @@ function showPresets(argv, initRun, checkIfLoad) { t.columns = _.pick(t.columns, clear); - if (info) { console.log('User: '.bold + users[0] + '\n'); } + if (info) { console.log('User: '.bold + users[0].underline + '\n'); } console.log(t.toString()); diff --git a/mongo-edu.js b/mongo-edu.js index 0419da0..9e98b1b 100644 --- a/mongo-edu.js +++ b/mongo-edu.js @@ -18,13 +18,17 @@ var pkg = require('./package'), path = require('path'), colors = require('colors'); +var appTitle = '[ ' + pkg.name.toUpperCase() + ' ' + pkg.version + ' ]'; + process.title = pkg.name; exports.create = function start() { 'use strict'; - console.log('\n[ ' + pkg.name.toUpperCase() + ' ' + pkg.version + ' ]\n'); + console.log('\n'); + console.log(' ' + appTitle.black.bold.bgWhite); + console.log('\n'); var argv = yargs.argv, slash = (/^win/.test(process.platform)) ? '\\' : '/'; diff --git a/package.json b/package.json index 073d346..b0f1227 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "mongo-edu", "preferGlobal": true, - "version": "0.1.50", + "version": "0.2.0", "author": "Przemyslaw Pluta <przemyslawplutadev@gmail.com> (http://przemyslawpluta.com)", "description": "Select and download videos and handouts from university.mongodb.com courses", "main": "./mongo-edu", @@ -31,7 +31,7 @@ "license": "MIT", "dependencies": { "cheerio": "~0.17.0", - "colors": "~0.6.2", + "colors": "~1.0.1", "easy-table": "~0.3.0", "filesize": "~2.0.3", "glob": "~4.0.6", |