New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

lynda-copy-course

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lynda-copy-course - npm Package Compare versions

Comparing version 2.0.0 to 2.1.0

Screenshot.PNG

0

.vscode/launch.json

@@ -0,0 +0,0 @@ {

24

bin/lynda-copy-course.js

@@ -6,4 +6,6 @@ #!/usr/bin/env node

var minimist = require("minimist");
var inq = require("inquirer");
var args = minimist(process.argv.slice(2));
var args = minimist(process.argv.slice(2), {
boolean: "all",
alias: { "all": "a" }
});
var sourceDir = args._[0];

@@ -19,16 +21,10 @@ var destDir = args._[1];

else {
inq.prompt([
{
type: "checkbox",
name: "courseList",
message: "The following courses are available for copying. Which would you like to copy?",
choices: copier.eligibleCoursesChoiceList()
}
]).then(function (answers) {
answers.courseList.forEach(function (course) {
copier.copy(course.id);
});
});
if (args["all"]) {
copier.copy(0);
}
else {
copier.initializeCopyDialogue();
}
}
}
//# sourceMappingURL=lynda-copy-course.js.map

@@ -7,3 +7,10 @@ #!/usr/bin/env node

let args = minimist(process.argv.slice(2));
let args = minimist(process.argv.slice(2), {
boolean: "all",
alias: { "all": "a" }
});
let sourceDir: string = args._[0];

@@ -20,16 +27,8 @@ let destDir: string = args._[1];

} else {
inq.prompt([
{
type: "checkbox",
name: "courseList",
message: "The following courses are available for copying. Which would you like to copy?",
choices: copier.eligibleCoursesChoiceList()
}
]).then((answers) => {
answers.courseList.forEach((course: Course) => {
copier.copy(course.id);
})
})
if (args["all"]) { // copy all eligible courses
copier.copy(0);
} else { // ask user which courses to copy
copier.initializeCopyDialogue();
}
}
}
{
"name": "lynda-copy-course",
"version": "2.0.0",
"version": "2.1.0",
"description": "A command-line utility for copying downloaded Lynda.com courses from one machine to another",

@@ -5,0 +5,0 @@ "bin": {

# lynda-copy-course
A utility for copying downloaded Lynda.com courses from one machine to another
A utility for copying downloaded Lynda.com courses from one machine to another.
![Example usage](./Screenshot.png)
## Installation

@@ -18,10 +20,21 @@

```
lynda-copy-course D:\path\to\source\Lynda\directory C:\path\to\destination\lynda\directory
lynda-copy-course D:\path\to\source\Lynda\directory C:\path\to\destination\lynda\directory [-a]
```
The input directories should be the folders which contain Lynda's sqlite database file, `db.sqlite`. On Windows, this folder is located at `"~\AppData\Local\lynda.com\Lynda.com Desktop App"` by default.
Source and destination directories are required.
All courses in the source folder will be copied to the destination folder, and the destination folder's original courses will remain.
Input directories should be the folders which contain Lynda's sqlite database file, `db.sqlite`. On Windows, this folder is located at `"~\AppData\Local\lynda.com\Lynda.com Desktop App"` by default.
If the optional `-a` or `--all` flags are passed, all eligible courses (ones present in the source directory but not present in the destination directory) will be copied. Otherwise, users will be prompted to select courses for copying, as in the above screenshot.
## Why?
My primary machine is an offline-first desktop with bandwidth restrictions. This utility lets me transfer Lynda.com courses downloaded with a laptop at my local library to my primary machine.
My primary machine is an offline-first desktop with bandwidth restrictions. This utility lets me transfer Lynda.com courses downloaded with a laptop at my local library to my primary machine.
## Warning!
This software is a rough cut, and has been 'tested' on a single windows machine. It's probably a good idea to create a backup copy of your 'destination' folder before use.
## A note to Lynda.com developers:
It would be handy if the Lynda.com Desktop app checked the local disk before downloading video files. That way, users could move course files manually, and the app would only have to download meta-data and thumbnails.

@@ -7,2 +7,3 @@ "use strict";

var _ = require("lodash");
var inq = require("inquirer");
var ncp_1 = require("ncp");

@@ -138,2 +139,17 @@ var Course = (function () {

};
LyndaCourseCopier.prototype.initializeCopyDialogue = function () {
var _this = this;
inq.prompt([
{
type: "checkbox",
name: "courseList",
message: "The following courses are available for copying. Which would you like to copy?",
choices: this.eligibleCoursesChoiceList()
}
]).then(function (answers) {
answers.courseList.forEach(function (course) {
_this.copy(course.id);
});
});
};
LyndaCourseCopier.prototype.copyCourseFiles = function (courseID) {

@@ -140,0 +156,0 @@ var _this = this;

@@ -5,2 +5,3 @@ import * as fs from 'fs'

import * as _ from 'lodash'
import * as inq from 'inquirer'
import { ncp } from 'ncp'

@@ -211,3 +212,20 @@

})
}
/**
* Prompts user to select courses for copying and then copies selected courses.
*/
initializeCopyDialogue() {
inq.prompt([
{
type: "checkbox",
name: "courseList",
message: "The following courses are available for copying. Which would you like to copy?",
choices: this.eligibleCoursesChoiceList()
}
]).then((answers) => {
answers.courseList.forEach((course: Course) => {
this.copy(course.id);
})
})
}

@@ -214,0 +232,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc