-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.js
37 lines (25 loc) · 1.02 KB
/
index.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
import '@nuogz/pangu/index.js?i18n&config&day&log&log.level=debug&log.willOutputConsoleError=true';
import { C, G } from '@nuogz/pangu';
import { T, TS } from './lib/i18n.js';
import parseRuncom from './src/parse-runcom.js';
import parseExtractConfig from './src/parse-extract-config.js';
import extractVoices from './src/extract-voices.js';
const GG = G.where(T('where:main'));
if(C.runcom instanceof Array == false) { GG.fatalE(-1, ...TS('verify-runcoms', { v: C.runcom }, 'invalid-type')); }
try {
const runcoms = parseRuncom(C.runcom);
const configsExtract = parseExtractConfig(runcoms);
for(const configExtract of configsExtract) {
if(configExtract.mode == 'skin') {
GG.info(...TS('execute-config', { config: configExtract }, 'info-skin'));
}
else {
GG.info(...TS('execute-config', { config: configExtract }, 'info-specify'));
}
await extractVoices(configExtract);
globalThis.console.log('\n===================== next runcom =====================\n');
}
}
catch(error) {
GG.error('提取[语音]', error);
}