-
Notifications
You must be signed in to change notification settings - Fork 0
/
CLI.js
43 lines (37 loc) · 1.52 KB
/
CLI.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
var request = require("request");
var inquirer = require("inquirer");
var basic = require("./basic.js");
var cloze = require("./cloze-card.js");
var card = process.argv[2];
switch (card) {
case "basic-card":
var firstPresident = new basic(
"Who was the first president of the United States?", "George Washington");
console.log("\n")
// "Who was the first president of the United States?"
console.log(firstPresident.front);
// "George Washington"
console.log(firstPresident.back);
var nowPresident = new basic('Who is the current president of the United States?', 'Donald Trump');
console.log("\n")
console.log(nowPresident.front);
console.log(nowPresident.back);
break;
case "cloze-card":
var firstPres = new cloze('George Washington', ' ... was the first president of the United States.');
console.log("\n")
console.log(firstPres.partial);
console.log(firstPres.cloze);
console.log("==============================================")
console.log(firstPres.full);
console.log("\n")
var nowPres = new cloze('Donald Trump', ' ... is the current president of the United States.');
console.log(nowPres.partial);
console.log(nowPres.cloze);
console.log("===============================================")
console.log(nowPres.full);
break;
default:
console.log("Please choose either basic-card or cloze-card");
break;
}