-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtest.js
More file actions
25 lines (23 loc) · 710 Bytes
/
test.js
File metadata and controls
25 lines (23 loc) · 710 Bytes
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
const m_data = require('./m_data');
const m_api = require('./m_api');
const m_exts = require('./m_exts');
const command = process.argv.slice(2);
switch(command[0]){
case 'clear':
m_data.clear_database();
break;
case 'search':
m_api.search_bangumi(command[1], (success, res) => {console.log(res)});
break;
case 'download':
m_api.download_file(command[1], command[2], () => {console.log('done.')});
break;
case 'a':
console.log(m_data.get_recent_bgms());
break;
case 'b':
console.log(m_exts.get_folder_name("/Volumes/SantiDisk/Video/番/双斩少女"));
break;
default:
console.log('no command');
}