@cloud411716/fancy-webnovel 0.1.54 → 0.1.56
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -92,6 +92,9 @@ export async function apply(ctx) {
|
|
|
92
92
|
|
|
93
93
|
notify(session, scan.notify({ type: 'collecting', platform, length }));
|
|
94
94
|
|
|
95
|
+
// 显示状态栏,运行时实时可见
|
|
96
|
+
ctx.tuiStatus?.set(`📊 采集中: ${platformLabel(platform)}(${length === 'long' ? '长篇' : '短篇'})`);
|
|
97
|
+
|
|
95
98
|
const scriptResult = await spawnScript(
|
|
96
99
|
'node',
|
|
97
100
|
[join(SCAN_SCRIPTS_DIR, 'run-scan.js'),
|
|
@@ -99,6 +102,8 @@ export async function apply(ctx) {
|
|
|
99
102
|
{ timeout: 120000 }
|
|
100
103
|
);
|
|
101
104
|
|
|
105
|
+
ctx.tuiStatus?.set('');
|
|
106
|
+
|
|
102
107
|
if (!scriptResult.ok) {
|
|
103
108
|
const err = (typeof scriptResult.error === 'object' && scriptResult.error !== null)
|
|
104
109
|
? (scriptResult.error.message || JSON.stringify(scriptResult.error))
|
|
@@ -10,8 +10,8 @@ export const PLATFORM_TABLE = [
|
|
|
10
10
|
['1', 'qidian', '长篇', '起点'],
|
|
11
11
|
['2', 'fanqie', '长篇', '番茄'],
|
|
12
12
|
['3', 'jinjiang', '长篇', '晋江'],
|
|
13
|
-
['4', 'zhihu', '
|
|
14
|
-
['
|
|
13
|
+
['4', 'zhihu', '需选择', '知乎'],
|
|
14
|
+
['5', 'qimao', '需选择', '七猫'],
|
|
15
15
|
];
|
|
16
16
|
|
|
17
17
|
export function platformLabel(platform) {
|
|
@@ -35,7 +35,7 @@ export const scan = {
|
|
|
35
35
|
},
|
|
36
36
|
|
|
37
37
|
askPlatform() {
|
|
38
|
-
return { question: '📊 请选择要扫的平台(输入编号 1-
|
|
38
|
+
return { question: '📊 请选择要扫的平台(输入编号 1-5):' };
|
|
39
39
|
},
|
|
40
40
|
|
|
41
41
|
askLength(platform) {
|
|
@@ -58,7 +58,7 @@ export const scan = {
|
|
|
58
58
|
return '⚠️ 当前目录尚未初始化。请先运行 /fancy-bootstrap 进行初始化。';
|
|
59
59
|
|
|
60
60
|
case 'invalid_choice':
|
|
61
|
-
return '❌ 无效选择,请输入 1-
|
|
61
|
+
return '❌ 无效选择,请输入 1-5 的编号。';
|
|
62
62
|
|
|
63
63
|
case 'cancelled':
|
|
64
64
|
return '🚫 已取消';
|