-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patharchive.txt
More file actions
56 lines (49 loc) · 1.11 KB
/
archive.txt
File metadata and controls
56 lines (49 loc) · 1.11 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
TODO codes which will be used in future
/*
const quickMain = async (query) => {
console.clear();
await title();
await wait(250);
if (!query) {
console.error(chalk.red("Error: Query cannot be empty."));
return;
}
const cache = readCache();
if (cache[query]) {
displaySearchResult(cache[query]);
return;
}
await searchAndCache(query, cache);
};
*/
/*
TODO: Commander.js
program
.name('wiki-cli')
.description('Awesome and interactive Wikipedia CLI for Node.js')
.version("1.0.0")
program.command('search <query>')
.description('Search for your query on Wikipedia')
.action((query) => {
quickMain(query);
});
program.command('interact')
.description('Opens CLI in interactive mode')
.action(() => {
main();
});
program.command('cache-clean')
.description('Clears cache')
.action(async () => {
const answer = await confirm({ message: 'Continue?' });
if (answer) {
clearCache()
console.log(chalk.magenta("Cleared Cache Successfully ✅"));
}
else {
console.log(chalk.magenta("Cancelled ❌"))
return;
}
});
program.parse();
*/