@dayinxisheng/novel-tools 0.1.0 → 0.2.0
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/CHANGELOG.md +60 -0
- package/README.md +78 -1
- package/dist/commands/event.d.ts +6 -0
- package/dist/commands/event.d.ts.map +1 -0
- package/dist/commands/event.js +107 -0
- package/dist/commands/event.js.map +1 -0
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.js +4 -0
- package/dist/commands/index.js.map +1 -1
- package/dist/commands/temp-setting.d.ts +6 -0
- package/dist/commands/temp-setting.d.ts.map +1 -0
- package/dist/commands/temp-setting.js +154 -0
- package/dist/commands/temp-setting.js.map +1 -0
- package/dist/core/types.d.ts +31 -0
- package/dist/core/types.d.ts.map +1 -1
- package/dist/services/event-command.service.d.ts +38 -0
- package/dist/services/event-command.service.d.ts.map +1 -0
- package/dist/services/event-command.service.js +267 -0
- package/dist/services/event-command.service.js.map +1 -0
- package/dist/services/index.d.ts +2 -0
- package/dist/services/index.d.ts.map +1 -1
- package/dist/services/index.js +2 -0
- package/dist/services/index.js.map +1 -1
- package/dist/services/temp-setting.service.d.ts +69 -0
- package/dist/services/temp-setting.service.d.ts.map +1 -0
- package/dist/services/temp-setting.service.js +314 -0
- package/dist/services/temp-setting.service.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
import { FileUtils } from '../core/file.js';
|
|
2
|
+
import * as path from 'path';
|
|
3
|
+
/**
|
|
4
|
+
* 临时设定服务类
|
|
5
|
+
* 管理待审核的临时设定,包括人物和元素
|
|
6
|
+
*/
|
|
7
|
+
export class TempSettingService {
|
|
8
|
+
REVIEW_QUEUE_FILE = 'temp_settings/review_queue.json';
|
|
9
|
+
PENDING_CHARACTERS_DIR = 'temp_settings/pending_characters';
|
|
10
|
+
PENDING_ELEMENTS_DIR = 'temp_settings/pending_elements';
|
|
11
|
+
CHARACTERS_DIR = 'characters/cards';
|
|
12
|
+
SETTINGS_DIR = 'settings/elements';
|
|
13
|
+
/**
|
|
14
|
+
* 添加临时设定
|
|
15
|
+
*/
|
|
16
|
+
async addTempSetting(projectPath, options) {
|
|
17
|
+
const timestamp = new Date().toISOString();
|
|
18
|
+
// 创建临时设定项
|
|
19
|
+
const tempItem = {
|
|
20
|
+
type: options.type,
|
|
21
|
+
name: options.name,
|
|
22
|
+
description: options.description || '',
|
|
23
|
+
chapter: options.chapter,
|
|
24
|
+
addedAt: timestamp
|
|
25
|
+
};
|
|
26
|
+
// 生成临时文件
|
|
27
|
+
const tempFilePath = await this.generateTempFile(projectPath, tempItem);
|
|
28
|
+
// 更新审核队列
|
|
29
|
+
await this.updateReviewQueue(projectPath, (queue) => {
|
|
30
|
+
const pendingItem = {
|
|
31
|
+
name: options.name,
|
|
32
|
+
type: options.type,
|
|
33
|
+
file: tempFilePath,
|
|
34
|
+
first_appear_chapter: options.chapter,
|
|
35
|
+
added_at: timestamp,
|
|
36
|
+
status: 'pending'
|
|
37
|
+
};
|
|
38
|
+
if (options.type === 'character') {
|
|
39
|
+
queue.pending_characters.push(pendingItem);
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
queue.pending_elements.push(pendingItem);
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
return tempFilePath;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* 列出待审核项
|
|
49
|
+
*/
|
|
50
|
+
async listPending(projectPath, type) {
|
|
51
|
+
const queue = await this.getReviewQueue(projectPath);
|
|
52
|
+
let items = [];
|
|
53
|
+
if (!type) {
|
|
54
|
+
items = [...queue.pending_characters, ...queue.pending_elements];
|
|
55
|
+
}
|
|
56
|
+
else if (type === 'character') {
|
|
57
|
+
items = queue.pending_characters;
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
items = queue.pending_elements.filter(item => item.type === type);
|
|
61
|
+
}
|
|
62
|
+
return items.filter(item => item.status === 'pending');
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* 获取审核队列
|
|
66
|
+
*/
|
|
67
|
+
async getReviewQueue(projectPath) {
|
|
68
|
+
const queuePath = path.join(projectPath, this.REVIEW_QUEUE_FILE);
|
|
69
|
+
const data = await FileUtils.readJson(queuePath);
|
|
70
|
+
if (!data) {
|
|
71
|
+
return {
|
|
72
|
+
pending_characters: [],
|
|
73
|
+
pending_elements: [],
|
|
74
|
+
last_review: null
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
// 规范化数据格式(兼容旧格式)
|
|
78
|
+
const queue = {
|
|
79
|
+
pending_characters: this.normalizePendingItems(data.pending_characters || []),
|
|
80
|
+
pending_elements: this.normalizePendingItems(data.pending_elements || []),
|
|
81
|
+
last_review: data.last_review || null
|
|
82
|
+
};
|
|
83
|
+
return queue;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* 规范化待审核项(兼容旧格式)
|
|
87
|
+
*/
|
|
88
|
+
normalizePendingItems(items) {
|
|
89
|
+
return items.map(item => {
|
|
90
|
+
// 检查是否为旧格式(数据嵌套在 data 对象中)
|
|
91
|
+
if (item.data && typeof item.data === 'object') {
|
|
92
|
+
return {
|
|
93
|
+
name: item.data.name || item.name,
|
|
94
|
+
type: item.data.type || item.type,
|
|
95
|
+
file: item.data.file || item.file,
|
|
96
|
+
first_appear_chapter: item.data.first_appear_chapter || item.first_appear_chapter || 0,
|
|
97
|
+
added_at: item.added_at || new Date().toISOString(),
|
|
98
|
+
status: item.status || 'pending'
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
// 新格式
|
|
102
|
+
return {
|
|
103
|
+
name: item.name,
|
|
104
|
+
type: item.type,
|
|
105
|
+
file: item.file,
|
|
106
|
+
first_appear_chapter: item.first_appear_chapter || 0,
|
|
107
|
+
added_at: item.added_at || new Date().toISOString(),
|
|
108
|
+
status: item.status || 'pending'
|
|
109
|
+
};
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* 审核通过并迁移
|
|
114
|
+
*/
|
|
115
|
+
async approveAndMigrate(projectPath, itemName, options) {
|
|
116
|
+
const queue = await this.getReviewQueue(projectPath);
|
|
117
|
+
// 查找待审核项
|
|
118
|
+
const item = this.findPendingItem(queue, itemName);
|
|
119
|
+
if (!item) {
|
|
120
|
+
throw new Error(`未找到待审核项: ${itemName}`);
|
|
121
|
+
}
|
|
122
|
+
// 迁移到正式设定
|
|
123
|
+
await this.migrateToFormal(projectPath, item, options);
|
|
124
|
+
// 从审核队列中移除
|
|
125
|
+
await this.removeFromQueue(projectPath, itemName);
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* 拒绝并删除
|
|
129
|
+
*/
|
|
130
|
+
async rejectAndRemove(projectPath, itemName) {
|
|
131
|
+
const queue = await this.getReviewQueue(projectPath);
|
|
132
|
+
// 查找待审核项
|
|
133
|
+
const item = this.findPendingItem(queue, itemName);
|
|
134
|
+
if (!item) {
|
|
135
|
+
throw new Error(`未找到待审核项: ${itemName}`);
|
|
136
|
+
}
|
|
137
|
+
// 删除临时文件
|
|
138
|
+
const tempFilePath = path.join(projectPath, item.file);
|
|
139
|
+
await FileUtils.remove(tempFilePath);
|
|
140
|
+
// 从审核队列中移除
|
|
141
|
+
await this.removeFromQueue(projectPath, itemName);
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* 交互式审核
|
|
145
|
+
*/
|
|
146
|
+
async reviewInteractive(projectPath) {
|
|
147
|
+
const { createInterface } = await import('readline');
|
|
148
|
+
const rl = createInterface({
|
|
149
|
+
input: process.stdin,
|
|
150
|
+
output: process.stdout
|
|
151
|
+
});
|
|
152
|
+
const question = (prompt) => {
|
|
153
|
+
return new Promise(resolve => {
|
|
154
|
+
rl.question(prompt, resolve);
|
|
155
|
+
});
|
|
156
|
+
};
|
|
157
|
+
try {
|
|
158
|
+
const items = await this.listPending(projectPath);
|
|
159
|
+
if (items.length === 0) {
|
|
160
|
+
console.log('没有待审核的设定');
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
for (const item of items) {
|
|
164
|
+
console.log(`\n审核: ${item.name} (${item.type}, 第${item.first_appear_chapter}章)`);
|
|
165
|
+
console.log('1. 查看详情');
|
|
166
|
+
console.log('2. 批准并迁移');
|
|
167
|
+
console.log('3. 拒绝并删除');
|
|
168
|
+
console.log('4. 跳过');
|
|
169
|
+
const choice = await question('选择? [1-4]: ');
|
|
170
|
+
switch (choice) {
|
|
171
|
+
case '1': {
|
|
172
|
+
const tempPath = path.join(projectPath, item.file);
|
|
173
|
+
const content = await FileUtils.readText(tempPath);
|
|
174
|
+
console.log('\n' + content);
|
|
175
|
+
await question('\n按 Enter 继续...');
|
|
176
|
+
break;
|
|
177
|
+
}
|
|
178
|
+
case '2': {
|
|
179
|
+
const migrateType = await question('迁移类型 (character/element)? [character]: ');
|
|
180
|
+
const options = {
|
|
181
|
+
toCharacter: migrateType === 'character' || migrateType === '',
|
|
182
|
+
toElement: migrateType === 'element'
|
|
183
|
+
};
|
|
184
|
+
await this.approveAndMigrate(projectPath, item.name, options);
|
|
185
|
+
console.log(`✓ 已迁移 ${item.name}`);
|
|
186
|
+
break;
|
|
187
|
+
}
|
|
188
|
+
case '3': {
|
|
189
|
+
await this.rejectAndRemove(projectPath, item.name);
|
|
190
|
+
console.log(`✓ 已删除 ${item.name}`);
|
|
191
|
+
break;
|
|
192
|
+
}
|
|
193
|
+
case '4':
|
|
194
|
+
console.log('跳过');
|
|
195
|
+
break;
|
|
196
|
+
default:
|
|
197
|
+
console.log('无效选择,跳过');
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
// 更新最后审核时间
|
|
201
|
+
await this.updateReviewQueue(projectPath, (queue) => {
|
|
202
|
+
queue.last_review = new Date().toISOString();
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
finally {
|
|
206
|
+
rl.close();
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* 生成临时设定文件
|
|
211
|
+
*/
|
|
212
|
+
async generateTempFile(projectPath, item) {
|
|
213
|
+
const isCharacter = item.type === 'character';
|
|
214
|
+
const dir = isCharacter ? this.PENDING_CHARACTERS_DIR : this.PENDING_ELEMENTS_DIR;
|
|
215
|
+
const fileName = `${item.name}.md`;
|
|
216
|
+
const filePath = path.join(projectPath, dir, fileName);
|
|
217
|
+
// 确保目录存在
|
|
218
|
+
await FileUtils.ensureDir(path.join(projectPath, dir));
|
|
219
|
+
// 生成文件内容
|
|
220
|
+
const content = this.generateTempFileContent(item);
|
|
221
|
+
await FileUtils.writeText(filePath, content);
|
|
222
|
+
return path.relative(projectPath, filePath);
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* 生成临时文件内容
|
|
226
|
+
*/
|
|
227
|
+
generateTempFileContent(item) {
|
|
228
|
+
const date = new Date(item.addedAt).toLocaleString('zh-CN');
|
|
229
|
+
return `# ${item.name}
|
|
230
|
+
|
|
231
|
+
## 临时设定
|
|
232
|
+
|
|
233
|
+
**状态**: 待审核
|
|
234
|
+
**类型**: ${this.getTypeLabel(item.type)}
|
|
235
|
+
**首次出场**: 第 ${item.chapter} 章
|
|
236
|
+
**添加时间**: ${date}
|
|
237
|
+
|
|
238
|
+
## 基本信息
|
|
239
|
+
|
|
240
|
+
${item.description || '暂无描述'}
|
|
241
|
+
|
|
242
|
+
## 待确认
|
|
243
|
+
|
|
244
|
+
- [ ] 是否与原作冲突(同人)
|
|
245
|
+
- [ ] 设定是否合理
|
|
246
|
+
- [ ] 是否需要补充详情
|
|
247
|
+
|
|
248
|
+
---
|
|
249
|
+
*此文件由 novel-tools 自动生成,审核后请手动整理到正式设定目录*
|
|
250
|
+
`;
|
|
251
|
+
}
|
|
252
|
+
/**
|
|
253
|
+
* 获取类型标签
|
|
254
|
+
*/
|
|
255
|
+
getTypeLabel(type) {
|
|
256
|
+
const labels = {
|
|
257
|
+
character: '人物',
|
|
258
|
+
location: '地点',
|
|
259
|
+
item: '物品',
|
|
260
|
+
skill: '技能',
|
|
261
|
+
other: '其他'
|
|
262
|
+
};
|
|
263
|
+
return labels[type] || type;
|
|
264
|
+
}
|
|
265
|
+
/**
|
|
266
|
+
* 迁移到正式设定
|
|
267
|
+
*/
|
|
268
|
+
async migrateToFormal(projectPath, item, options) {
|
|
269
|
+
// 读取临时文件
|
|
270
|
+
const tempFilePath = path.join(projectPath, item.file);
|
|
271
|
+
const content = await FileUtils.readText(tempFilePath);
|
|
272
|
+
let targetPath;
|
|
273
|
+
if (options.customPath) {
|
|
274
|
+
targetPath = path.join(projectPath, options.customPath);
|
|
275
|
+
}
|
|
276
|
+
else if (options.toCharacter || item.type === 'character') {
|
|
277
|
+
// 迁移到人物卡片
|
|
278
|
+
targetPath = path.join(projectPath, this.CHARACTERS_DIR, 'main', `${item.name}.md`);
|
|
279
|
+
}
|
|
280
|
+
else {
|
|
281
|
+
// 迁移到设定元素
|
|
282
|
+
targetPath = path.join(projectPath, this.SETTINGS_DIR, `${item.name}.md`);
|
|
283
|
+
}
|
|
284
|
+
// 复制到目标位置
|
|
285
|
+
await FileUtils.writeText(targetPath, content);
|
|
286
|
+
// 删除临时文件
|
|
287
|
+
await FileUtils.remove(tempFilePath);
|
|
288
|
+
}
|
|
289
|
+
/**
|
|
290
|
+
* 从审核队列中移除
|
|
291
|
+
*/
|
|
292
|
+
async removeFromQueue(projectPath, itemName) {
|
|
293
|
+
await this.updateReviewQueue(projectPath, (queue) => {
|
|
294
|
+
queue.pending_characters = queue.pending_characters.filter(i => i.name !== itemName);
|
|
295
|
+
queue.pending_elements = queue.pending_elements.filter(i => i.name !== itemName);
|
|
296
|
+
});
|
|
297
|
+
}
|
|
298
|
+
/**
|
|
299
|
+
* 查找待审核项
|
|
300
|
+
*/
|
|
301
|
+
findPendingItem(queue, itemName) {
|
|
302
|
+
return [...queue.pending_characters, ...queue.pending_elements].find(item => item.name === itemName && item.status === 'pending');
|
|
303
|
+
}
|
|
304
|
+
/**
|
|
305
|
+
* 更新审核队列
|
|
306
|
+
*/
|
|
307
|
+
async updateReviewQueue(projectPath, updater) {
|
|
308
|
+
const queue = await this.getReviewQueue(projectPath);
|
|
309
|
+
updater(queue);
|
|
310
|
+
const queuePath = path.join(projectPath, this.REVIEW_QUEUE_FILE);
|
|
311
|
+
await FileUtils.writeJson(queuePath, queue);
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
//# sourceMappingURL=temp-setting.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"temp-setting.service.js","sourceRoot":"","sources":["../../src/services/temp-setting.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAQ5C,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAE7B;;;GAGG;AACH,MAAM,OAAO,kBAAkB;IACZ,iBAAiB,GAAG,iCAAiC,CAAC;IACtD,sBAAsB,GAAG,kCAAkC,CAAC;IAC5D,oBAAoB,GAAG,gCAAgC,CAAC;IACxD,cAAc,GAAG,kBAAkB,CAAC;IACpC,YAAY,GAAG,mBAAmB,CAAC;IAEpD;;OAEG;IACH,KAAK,CAAC,cAAc,CAClB,WAAmB,EACnB,OAA8B;QAE9B,MAAM,SAAS,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;QAE3C,UAAU;QACV,MAAM,QAAQ,GAAoB;YAChC,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,WAAW,EAAE,OAAO,CAAC,WAAW,IAAI,EAAE;YACtC,OAAO,EAAE,OAAO,CAAC,OAAO;YACxB,OAAO,EAAE,SAAS;SACnB,CAAC;QAEF,SAAS;QACT,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;QAExE,SAAS;QACT,MAAM,IAAI,CAAC,iBAAiB,CAAC,WAAW,EAAE,CAAC,KAAK,EAAE,EAAE;YAClD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