novelws 1.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 +161 -0
- package/LICENSE +22 -0
- package/README.md +372 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +50 -0
- package/dist/cli.js.map +1 -0
- package/dist/commands/check.d.ts +6 -0
- package/dist/commands/check.d.ts.map +1 -0
- package/dist/commands/check.js +32 -0
- package/dist/commands/check.js.map +1 -0
- package/dist/commands/init.d.ts +6 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +160 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/plugin.d.ts +6 -0
- package/dist/commands/plugin.d.ts.map +1 -0
- package/dist/commands/plugin.js +135 -0
- package/dist/commands/plugin.js.map +1 -0
- package/dist/commands/upgrade.d.ts +6 -0
- package/dist/commands/upgrade.d.ts.map +1 -0
- package/dist/commands/upgrade.js +92 -0
- package/dist/commands/upgrade.js.map +1 -0
- package/dist/core/config.d.ts +72 -0
- package/dist/core/config.d.ts.map +1 -0
- package/dist/core/config.js +136 -0
- package/dist/core/config.js.map +1 -0
- package/dist/core/errors.d.ts +59 -0
- package/dist/core/errors.d.ts.map +1 -0
- package/dist/core/errors.js +125 -0
- package/dist/core/errors.js.map +1 -0
- package/dist/core/platform.d.ts +27 -0
- package/dist/core/platform.d.ts.map +1 -0
- package/dist/core/platform.js +75 -0
- package/dist/core/platform.js.map +1 -0
- package/dist/core/template.d.ts +35 -0
- package/dist/core/template.d.ts.map +1 -0
- package/dist/core/template.js +94 -0
- package/dist/core/template.js.map +1 -0
- package/dist/plugins/identifier.d.ts +13 -0
- package/dist/plugins/identifier.d.ts.map +1 -0
- package/dist/plugins/identifier.js +72 -0
- package/dist/plugins/identifier.js.map +1 -0
- package/dist/plugins/installers/base.d.ts +27 -0
- package/dist/plugins/installers/base.d.ts.map +1 -0
- package/dist/plugins/installers/base.js +30 -0
- package/dist/plugins/installers/base.js.map +1 -0
- package/dist/plugins/installers/github.d.ts +22 -0
- package/dist/plugins/installers/github.d.ts.map +1 -0
- package/dist/plugins/installers/github.js +133 -0
- package/dist/plugins/installers/github.js.map +1 -0
- package/dist/plugins/installers/local.d.ts +16 -0
- package/dist/plugins/installers/local.d.ts.map +1 -0
- package/dist/plugins/installers/local.js +69 -0
- package/dist/plugins/installers/local.js.map +1 -0
- package/dist/plugins/installers/npm.d.ts +20 -0
- package/dist/plugins/installers/npm.d.ts.map +1 -0
- package/dist/plugins/installers/npm.js +99 -0
- package/dist/plugins/installers/npm.js.map +1 -0
- package/dist/plugins/manager.d.ts +77 -0
- package/dist/plugins/manager.d.ts.map +1 -0
- package/dist/plugins/manager.js +349 -0
- package/dist/plugins/manager.js.map +1 -0
- package/dist/plugins/registry.d.ts +48 -0
- package/dist/plugins/registry.d.ts.map +1 -0
- package/dist/plugins/registry.js +111 -0
- package/dist/plugins/registry.js.map +1 -0
- package/dist/plugins/types.d.ts +66 -0
- package/dist/plugins/types.d.ts.map +1 -0
- package/dist/plugins/types.js +2 -0
- package/dist/plugins/types.js.map +1 -0
- package/dist/plugins/validator.d.ts +19 -0
- package/dist/plugins/validator.d.ts.map +1 -0
- package/dist/plugins/validator.js +164 -0
- package/dist/plugins/validator.js.map +1 -0
- package/dist/utils/logger.d.ts +13 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +48 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/project.d.ts +24 -0
- package/dist/utils/project.d.ts.map +1 -0
- package/dist/utils/project.js +61 -0
- package/dist/utils/project.js.map +1 -0
- package/dist/version.d.ts +3 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +21 -0
- package/dist/version.js.map +1 -0
- package/package.json +76 -0
- package/plugins/authentic-voice/README.md +31 -0
- package/plugins/authentic-voice/commands/authentic-voice.md +73 -0
- package/plugins/authentic-voice/commands/authenticity-audit.md +37 -0
- package/plugins/authentic-voice/config.yaml +30 -0
- package/plugins/authentic-voice/experts/authentic-editor.md +27 -0
- package/plugins/export/README.md +319 -0
- package/plugins/export/commands/export.md +460 -0
- package/plugins/export/commands/generate-cover.md +256 -0
- package/plugins/export/commands/metadata.md +309 -0
- package/plugins/export/config.yaml +47 -0
- package/plugins/export/experts/publishing-expert.md +171 -0
- package/plugins/export/templates/epub/chapter-template.html +13 -0
- package/plugins/export/templates/epub/cover-template.html +14 -0
- package/plugins/export/templates/epub/stylesheet.css +200 -0
- package/plugins/export/templates/pdf/ebook-style.css +137 -0
- package/plugins/export/templates/pdf/print-style.css +179 -0
- package/plugins/export/templates/platforms/jinjiang-format.md +101 -0
- package/plugins/export/templates/platforms/qidian-format.md +108 -0
- package/plugins/export/templates/platforms/tomato-format.md +95 -0
- package/plugins/translate/README.md +265 -0
- package/plugins/translate/commands/glossary.md +731 -0
- package/plugins/translate/commands/translate-preview.md +543 -0
- package/plugins/translate/commands/translate.md +649 -0
- package/plugins/translate/config.yaml +43 -0
- package/plugins/translate/experts/literary-translator.md +605 -0
- package/templates/commands/analyze.md +1485 -0
- package/templates/commands/checklist.md +434 -0
- package/templates/commands/clarify.md +257 -0
- package/templates/commands/constitution.md +257 -0
- package/templates/commands/expert.md +136 -0
- package/templates/commands/plan.md +749 -0
- package/templates/commands/recap.md +613 -0
- package/templates/commands/relations.md +96 -0
- package/templates/commands/revise.md +341 -0
- package/templates/commands/specify.md +682 -0
- package/templates/commands/tasks.md +142 -0
- package/templates/commands/timeline.md +73 -0
- package/templates/commands/track-init.md +137 -0
- package/templates/commands/track.md +463 -0
- package/templates/commands/write.md +1264 -0
- package/templates/config/keyword-mappings.json +106 -0
- package/templates/knowledge/audit-config.json +26 -0
- package/templates/knowledge/character-profiles.md +152 -0
- package/templates/knowledge/character-voices.md +137 -0
- package/templates/knowledge/locations.md +184 -0
- package/templates/knowledge/world-setting.md +121 -0
- package/templates/knowledge-base/README.md +285 -0
- package/templates/knowledge-base/character-archetypes/01-hero.md +233 -0
- package/templates/knowledge-base/character-archetypes/02-mentor.md +177 -0
- package/templates/knowledge-base/character-archetypes/03-shadow.md +221 -0
- package/templates/knowledge-base/character-archetypes/04-ally.md +178 -0
- package/templates/knowledge-base/character-archetypes/05-shapeshifter.md +177 -0
- package/templates/knowledge-base/character-archetypes/06-trickster.md +181 -0
- package/templates/knowledge-base/character-archetypes/07-threshold-guardian.md +177 -0
- package/templates/knowledge-base/character-archetypes/08-herald.md +180 -0
- package/templates/knowledge-base/character-archetypes/09-father.md +249 -0
- package/templates/knowledge-base/character-archetypes/10-mother.md +202 -0
- package/templates/knowledge-base/character-archetypes/11-child.md +183 -0
- package/templates/knowledge-base/character-archetypes/12-sage.md +202 -0
- package/templates/knowledge-base/character-archetypes/README.md +60 -0
- package/templates/knowledge-base/character-archetypes/application-guide.md +222 -0
- package/templates/knowledge-base/character-archetypes/archetype-combinations.md +242 -0
- package/templates/knowledge-base/character-archetypes/config.yaml +28 -0
- package/templates/knowledge-base/character-archetypes/examples-analysis.md +223 -0
- package/templates/knowledge-base/craft/character-arc.md +1153 -0
- package/templates/knowledge-base/craft/dialogue.md +1170 -0
- package/templates/knowledge-base/craft/pacing.md +1200 -0
- package/templates/knowledge-base/craft/scene-structure.md +1136 -0
- package/templates/knowledge-base/craft/show-not-tell.md +1012 -0
- package/templates/knowledge-base/emotional-beats/01-first-meeting.md +145 -0
- package/templates/knowledge-base/emotional-beats/02-bonding-moment.md +226 -0
- package/templates/knowledge-base/emotional-beats/03-declaration.md +284 -0
- package/templates/knowledge-base/emotional-beats/04-triumph.md +240 -0
- package/templates/knowledge-base/emotional-beats/05-reunion.md +396 -0
- package/templates/knowledge-base/emotional-beats/06-forgiveness.md +204 -0
- package/templates/knowledge-base/emotional-beats/07-betrayal.md +204 -0
- package/templates/knowledge-base/emotional-beats/08-loss.md +214 -0
- package/templates/knowledge-base/emotional-beats/09-rejection.md +254 -0
- package/templates/knowledge-base/emotional-beats/10-failure.md +244 -0
- package/templates/knowledge-base/emotional-beats/11-misunderstanding.md +205 -0
- package/templates/knowledge-base/emotional-beats/12-farewell.md +283 -0
- package/templates/knowledge-base/emotional-beats/13-revelation.md +242 -0
- package/templates/knowledge-base/emotional-beats/14-point-of-no-return.md +215 -0
- package/templates/knowledge-base/emotional-beats/15-dark-night.md +244 -0
- package/templates/knowledge-base/emotional-beats/16-sacrifice.md +246 -0
- package/templates/knowledge-base/emotional-beats/17-awakening.md +246 -0
- package/templates/knowledge-base/emotional-beats/18-confrontation.md +217 -0
- package/templates/knowledge-base/emotional-beats/19-bittersweet-goodbye.md +368 -0
- package/templates/knowledge-base/emotional-beats/20-moral-dilemma.md +248 -0
- package/templates/knowledge-base/emotional-beats/21-temptation.md +240 -0
- package/templates/knowledge-base/emotional-beats/22-redemption.md +210 -0
- package/templates/knowledge-base/emotional-beats/README.md +104 -0
- package/templates/knowledge-base/emotional-beats/beat-sequences.md +276 -0
- package/templates/knowledge-base/emotional-beats/config.yaml +30 -0
- package/templates/knowledge-base/emotional-beats/pacing-guide.md +390 -0
- package/templates/knowledge-base/genres/historical.md +1127 -0
- package/templates/knowledge-base/genres/mystery.md +1123 -0
- package/templates/knowledge-base/genres/revenge.md +846 -0
- package/templates/knowledge-base/genres/romance.md +948 -0
- package/templates/knowledge-base/genres/sci-fi.md +156 -0
- package/templates/knowledge-base/genres/thriller.md +166 -0
- package/templates/knowledge-base/genres/wuxia.md +143 -0
- package/templates/knowledge-base/references/README.md +96 -0
- package/templates/knowledge-base/references/china-1920s/culture.md +423 -0
- package/templates/knowledge-base/references/china-1920s/daily-life.md +616 -0
- package/templates/knowledge-base/references/china-1920s/overview.md +298 -0
- package/templates/knowledge-base/references/china-1920s/society.md +703 -0
- package/templates/knowledge-base/references/china-1920s/warlords.md +427 -0
- package/templates/knowledge-base/references/cultivation-world/daily-life.md +108 -0
- package/templates/knowledge-base/references/cultivation-world/overview.md +64 -0
- package/templates/knowledge-base/references/cultivation-world/power-system.md +108 -0
- package/templates/knowledge-base/references/cultivation-world/sects.md +104 -0
- package/templates/knowledge-base/references/cultivation-world/world-setting.md +108 -0
- package/templates/knowledge-base/references/modern-workplace/corporate.md +115 -0
- package/templates/knowledge-base/references/modern-workplace/daily-life.md +129 -0
- package/templates/knowledge-base/references/modern-workplace/overview.md +73 -0
- package/templates/knowledge-base/references/modern-workplace/relationships.md +107 -0
- package/templates/knowledge-base/references/modern-workplace/tech-industry.md +131 -0
- package/templates/knowledge-base/references/tang-dynasty/culture.md +135 -0
- package/templates/knowledge-base/references/tang-dynasty/daily-life.md +139 -0
- package/templates/knowledge-base/references/tang-dynasty/overview.md +76 -0
- package/templates/knowledge-base/references/tang-dynasty/politics.md +121 -0
- package/templates/knowledge-base/references/tang-dynasty/society.md +126 -0
- package/templates/knowledge-base/requirements/README.md +240 -0
- package/templates/knowledge-base/requirements/anti-ai-v3.md +46 -0
- package/templates/knowledge-base/requirements/anti-ai-v4.md +430 -0
- package/templates/knowledge-base/requirements/fast-paced.md +552 -0
- package/templates/knowledge-base/requirements/no-poison.md +60 -0
- package/templates/knowledge-base/requirements/romance-angst.md +102 -0
- package/templates/knowledge-base/requirements/romance-sweet.md +63 -0
- package/templates/knowledge-base/requirements/serious-literature.md +45 -0
- package/templates/knowledge-base/requirements/strong-emotion.md +60 -0
- package/templates/knowledge-base/styles/README.md +302 -0
- package/templates/knowledge-base/styles/ancient-style.md +579 -0
- package/templates/knowledge-base/styles/literary.md +439 -0
- package/templates/knowledge-base/styles/minimal.md +472 -0
- package/templates/knowledge-base/styles/natural-voice.md +930 -0
- package/templates/knowledge-base/styles/web-novel.md +525 -0
- package/templates/memory/constitution.md +140 -0
- package/templates/memory/personal-voice.md +113 -0
- package/templates/scripts/README.md +187 -0
- package/templates/scripts/bash/analyze-story.sh +170 -0
- package/templates/scripts/bash/check-consistency.sh +463 -0
- package/templates/scripts/bash/check-plot.sh +374 -0
- package/templates/scripts/bash/check-timeline.sh +346 -0
- package/templates/scripts/bash/check-world.sh +395 -0
- package/templates/scripts/bash/check-writing-state.sh +854 -0
- package/templates/scripts/bash/clarify-story.sh +117 -0
- package/templates/scripts/bash/common.sh +151 -0
- package/templates/scripts/bash/constitution.sh +114 -0
- package/templates/scripts/bash/generate-tasks.sh +65 -0
- package/templates/scripts/bash/init-tracking.sh +183 -0
- package/templates/scripts/bash/manage-relations.sh +174 -0
- package/templates/scripts/bash/plan-story.sh +100 -0
- package/templates/scripts/bash/specify-story.sh +93 -0
- package/templates/scripts/bash/tasks-story.sh +96 -0
- package/templates/scripts/bash/test-word-count.sh +182 -0
- package/templates/scripts/bash/tests/bench-preload-cache.sh +100 -0
- package/templates/scripts/bash/tests/run-all-benchmarks.sh +16 -0
- package/templates/scripts/bash/tests/test-cache-semantics.sh +199 -0
- package/templates/scripts/bash/tests/test-cross-platform.sh +35 -0
- package/templates/scripts/bash/tests/test-edge-cases-bash.sh +60 -0
- package/templates/scripts/bash/tests/test-phase1-bash.sh +28 -0
- package/templates/scripts/bash/tests/test-preload-cache.sh +123 -0
- package/templates/scripts/bash/tests/test-regex-precompile.sh +89 -0
- package/templates/scripts/bash/tests/test-regression-bash.sh +42 -0
- package/templates/scripts/bash/tests/test-task6-verification.sh +200 -0
- package/templates/scripts/bash/text-audit.sh +144 -0
- package/templates/scripts/bash/track-progress.sh +194 -0
- package/templates/scripts/powershell/analyze-story.ps1 +171 -0
- package/templates/scripts/powershell/check-analyze-stage.ps1 +110 -0
- package/templates/scripts/powershell/check-consistency.ps1 +138 -0
- package/templates/scripts/powershell/check-plot.ps1 +139 -0
- package/templates/scripts/powershell/check-timeline.ps1 +112 -0
- package/templates/scripts/powershell/check-writing-state.ps1 +490 -0
- package/templates/scripts/powershell/check-writing-state.ps1.backup +135 -0
- package/templates/scripts/powershell/clarify-story.ps1 +107 -0
- package/templates/scripts/powershell/common.ps1 +36 -0
- package/templates/scripts/powershell/constitution.ps1 +142 -0
- package/templates/scripts/powershell/generate-tasks.ps1 +75 -0
- package/templates/scripts/powershell/init-tracking.ps1 +98 -0
- package/templates/scripts/powershell/manage-relations.ps1 +134 -0
- package/templates/scripts/powershell/plan-story.ps1 +96 -0
- package/templates/scripts/powershell/specify-story.ps1 +82 -0
- package/templates/scripts/powershell/tests/bench-ps-cache.ps1 +80 -0
- package/templates/scripts/powershell/tests/test-cross-platform.ps1 +27 -0
- package/templates/scripts/powershell/tests/test-edge-cases-ps.ps1 +29 -0
- package/templates/scripts/powershell/tests/test-phase1-ps.ps1 +28 -0
- package/templates/scripts/powershell/tests/test-ps-cache.ps1 +73 -0
- package/templates/scripts/powershell/tests/test-regression-ps.ps1 +40 -0
- package/templates/scripts/powershell/text-audit.ps1 +100 -0
- package/templates/scripts/powershell/track-progress.ps1 +105 -0
- package/templates/skills/genre-knowledge/fantasy/SKILL.md +355 -0
- package/templates/skills/genre-knowledge/mystery/SKILL.md +337 -0
- package/templates/skills/genre-knowledge/romance/SKILL.md +228 -0
- package/templates/skills/genre-knowledge/sci-fi/SKILL.md +65 -0
- package/templates/skills/genre-knowledge/thriller/SKILL.md +95 -0
- package/templates/skills/quality-assurance/consistency-checker/SKILL.md +341 -0
- package/templates/skills/quality-assurance/continuity-tracker/SKILL.md +157 -0
- package/templates/skills/quality-assurance/forgotten-elements/SKILL.md +147 -0
- package/templates/skills/quality-assurance/getting-started/SKILL.md +224 -0
- package/templates/skills/quality-assurance/pacing-monitor/SKILL.md +143 -0
- package/templates/skills/quality-assurance/pov-validator/SKILL.md +135 -0
- package/templates/skills/quality-assurance/pre-write-checklist/SKILL.md +583 -0
- package/templates/skills/quality-assurance/requirement-detector/CONFLICT_RESOLUTION.md +119 -0
- package/templates/skills/quality-assurance/requirement-detector/EXAMPLES.md +146 -0
- package/templates/skills/quality-assurance/requirement-detector/KEYWORDS.md +160 -0
- package/templates/skills/quality-assurance/requirement-detector/SKILL.md +149 -0
- package/templates/skills/quality-assurance/setting-detector/SKILL.md +611 -0
- package/templates/skills/quality-assurance/style-detector/CONFLICT_RESOLUTION.md +126 -0
- package/templates/skills/quality-assurance/style-detector/EXAMPLES.md +206 -0
- package/templates/skills/quality-assurance/style-detector/KEYWORDS.md +207 -0
- package/templates/skills/quality-assurance/style-detector/SKILL.md +126 -0
- package/templates/skills/quality-assurance/workflow-guide/SKILL.md +381 -0
- package/templates/skills/writing-techniques/character-arc/SKILL.md +267 -0
- package/templates/skills/writing-techniques/dialogue-techniques/SKILL.md +366 -0
- package/templates/skills/writing-techniques/multi-thread-narrative/SKILL.md +553 -0
- package/templates/skills/writing-techniques/multi-thread-narrative/experts/thread-analyst.md +226 -0
- package/templates/skills/writing-techniques/pacing-control/SKILL.md +377 -0
- package/templates/skills/writing-techniques/reader-expectation/SKILL.md +578 -0
- package/templates/skills/writing-techniques/reader-expectation/experts/expectation-analyst.md +209 -0
- package/templates/skills/writing-techniques/revision-polish/SKILL.md +496 -0
- package/templates/skills/writing-techniques/revision-polish/experts/revision-editor.md +221 -0
- package/templates/skills/writing-techniques/scene-structure/SKILL.md +361 -0
- package/templates/skills/writing-techniques/style-learning/SKILL.md +436 -0
- package/templates/specification-example.md +146 -0
- package/templates/tracking/character-state.json +78 -0
- package/templates/tracking/plot-tracker.json +62 -0
- package/templates/tracking/relationships.json +70 -0
- package/templates/tracking/timeline.json +49 -0
- package/templates/tracking/tracking-log.md +110 -0
- package/templates/tracking/validation-rules.json +128 -0
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# 番茄小说格式规范
|
|
2
|
+
|
|
3
|
+
## 概述
|
|
4
|
+
|
|
5
|
+
番茄小说(Tomato Novel)是字节跳动旗下的免费小说平台。本文档定义了从 Markdown 转换为番茄格式的规则。
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## 转换规则
|
|
10
|
+
|
|
11
|
+
### 1. 章节标题
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
原始 Markdown:# 开端
|
|
15
|
+
转换结果:1. 开端
|
|
16
|
+
|
|
17
|
+
原始 Markdown:# 转折
|
|
18
|
+
转换结果:2. 转折
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
**规则:**
|
|
22
|
+
- `# 标题` -> `X. 标题`
|
|
23
|
+
- 使用阿拉伯数字编号
|
|
24
|
+
- 标题独占一行
|
|
25
|
+
|
|
26
|
+
### 2. 正文格式
|
|
27
|
+
|
|
28
|
+
**段落处理:**
|
|
29
|
+
- 段落之间空一行
|
|
30
|
+
- 段落开头不缩进(番茄 App 自动处理缩进)
|
|
31
|
+
- 去除所有 Markdown 格式标记
|
|
32
|
+
|
|
33
|
+
**格式标记去除:**
|
|
34
|
+
|
|
35
|
+
| Markdown | 转换结果 |
|
|
36
|
+
|----------|---------|
|
|
37
|
+
| `**粗体**` | 粗体 |
|
|
38
|
+
| `*斜体*` | 斜体 |
|
|
39
|
+
| `> 引用` | 引用内容 |
|
|
40
|
+
| 其他标记 | 纯文本 |
|
|
41
|
+
|
|
42
|
+
### 3. 引号
|
|
43
|
+
|
|
44
|
+
- 保持中文引号 `""` `''`
|
|
45
|
+
- 不转换为直角引号
|
|
46
|
+
|
|
47
|
+
### 4. 场景分隔
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
原始:--- 或 ***
|
|
51
|
+
转换:(空行 + 空行,即两个空行)
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### 5. 编码和输出
|
|
55
|
+
|
|
56
|
+
- 编码:UTF-8(无 BOM)
|
|
57
|
+
- 输出:每章独立 TXT 文件
|
|
58
|
+
- 文件名:`{序号}-{标题}.txt`(如 `001-开端.txt`)
|
|
59
|
+
- 换行符:`\r\n`
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## 输出格式示例
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
1. 开端
|
|
67
|
+
|
|
68
|
+
李明站在青云宗的山门前,抬头望着那高耸入云的石阶。
|
|
69
|
+
|
|
70
|
+
"你就是新来的弟子?"一个声音从身后传来。
|
|
71
|
+
|
|
72
|
+
他转过身,看到一个身穿白衣的少女正打量着他。
|
|
73
|
+
|
|
74
|
+
"是的,我叫李明。"他拱手行礼。
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## 字数限制
|
|
80
|
+
|
|
81
|
+
- 单章建议:1500-3000 字
|
|
82
|
+
- 单章上限:3000 字(超出需拆分)
|
|
83
|
+
- 拆分策略:在场景分隔处或段落结尾处拆分
|
|
84
|
+
|
|
85
|
+
**超出处理:**
|
|
86
|
+
|
|
87
|
+
```
|
|
88
|
+
检测到第 5 章超过 3000 字(实际 4200 字)
|
|
89
|
+
|
|
90
|
+
自动拆分建议:
|
|
91
|
+
第 5 章(上):2100 字(在场景分隔处拆分)
|
|
92
|
+
第 5 章(下):2100 字
|
|
93
|
+
|
|
94
|
+
是否接受拆分?
|
|
95
|
+
```
|
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
# Translate 翻译插件
|
|
2
|
+
|
|
3
|
+
## 概述
|
|
4
|
+
|
|
5
|
+
支持小说的多语言翻译(中英日),保持文学性与术语一致性。
|
|
6
|
+
|
|
7
|
+
## 核心特性
|
|
8
|
+
|
|
9
|
+
- **术语一致性 100%** - 自动应用术语表,确保角色名、地名、专有名词翻译统一
|
|
10
|
+
- **保持文学性** - 非直译,而是文学翻译(意译 + 文化适应)
|
|
11
|
+
- **智能分段翻译** - 每段 ~2000 字 + 上下文,避免超长输入导致质量下降
|
|
12
|
+
- **两遍翻译策略** - 第一遍直译(准确性),第二遍润色(流畅性)
|
|
13
|
+
- **文化适应处理** - 成语、典故、称呼等自动本地化
|
|
14
|
+
- **翻译质量检查** - 自动检测术语一致性、段落对应、长度合理性
|
|
15
|
+
|
|
16
|
+
## 命令
|
|
17
|
+
|
|
18
|
+
### /translate - 翻译章节或全书
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
/translate --to en chapter-01.md # 翻译单章为英文
|
|
22
|
+
/translate --to en --all # 翻译全书为英文
|
|
23
|
+
/translate --to ja --chapters 1-10 # 翻译第 1-10 章为日文
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
**选项:**
|
|
27
|
+
- `--from <语言>` - 源语言(默认自动检测)
|
|
28
|
+
- `--to <语言>` - 目标语言(必需)
|
|
29
|
+
- `--all` - 翻译全书
|
|
30
|
+
- `--chapters <范围>` - 章节范围(如 `1-10`)
|
|
31
|
+
- `--style <风格>` - 翻译风格(literary/casual/formal,默认 literary)
|
|
32
|
+
- `--glossary <文件>` - 指定术语表(默认 .specify/translation/glossary.json)
|
|
33
|
+
- `--skip-existing` - 跳过已翻译章节
|
|
34
|
+
|
|
35
|
+
### /glossary - 管理术语表
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
/glossary init # 初始化术语表
|
|
39
|
+
/glossary add "角色:李明|Li Ming|リ・ミン" # 添加术语
|
|
40
|
+
/glossary list # 查看全部术语
|
|
41
|
+
/glossary extract # 自动提取专有名词
|
|
42
|
+
/glossary import glossary.csv # 批量导入
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### /translate-preview - 预览翻译效果
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
/translate-preview --to en # 预览当前章节
|
|
49
|
+
/translate-preview --to en --compare-styles # 对比三种风格
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## 支持的语言
|
|
53
|
+
|
|
54
|
+
| 代码 | 语言 | 说明 |
|
|
55
|
+
|------|------|------|
|
|
56
|
+
| `zh` | 中文(简体) | 默认源语言 |
|
|
57
|
+
| `en` | 英文 | 网文出海首选 |
|
|
58
|
+
| `ja` | 日文 | 轻小说市场 |
|
|
59
|
+
|
|
60
|
+
## 翻译风格
|
|
61
|
+
|
|
62
|
+
| 风格 | 说明 | 适用场景 |
|
|
63
|
+
|------|------|---------|
|
|
64
|
+
| `literary`(默认) | 文学性翻译,保持意境和节奏 | 严肃文学、文青向网文 |
|
|
65
|
+
| `casual` | 口语化翻译,通俗易懂 | 爽文、轻小说 |
|
|
66
|
+
| `formal` | 正式翻译,庄重典雅 | 历史、武侠 |
|
|
67
|
+
|
|
68
|
+
## 快速开始
|
|
69
|
+
|
|
70
|
+
### 1. 初始化术语表
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
/glossary init
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
这会在 `.specify/translation/` 创建 `glossary.json`,并自动扫描 `spec/knowledge/` 提取角色名和地名。
|
|
77
|
+
|
|
78
|
+
### 2. 添加核心术语
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
/glossary add "角色:李明|Li Ming"
|
|
82
|
+
/glossary add "地名:青云宗|Azure Cloud Sect"
|
|
83
|
+
/glossary add "功法:青云剑法|Azure Cloud Sword Art"
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### 3. 预览翻译风格
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
/translate-preview --to en --compare-styles
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
查看三种翻译风格(literary/casual/formal)的效果,选择最适合的。
|
|
93
|
+
|
|
94
|
+
### 4. 翻译章节
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
/translate --to en chapter-01.md
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### 5. 翻译全书
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
/translate --to en --all
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
## 输出目录结构
|
|
107
|
+
|
|
108
|
+
```
|
|
109
|
+
stories/[story-name]/translations/
|
|
110
|
+
├── en/ # 英文版
|
|
111
|
+
│ ├── content/
|
|
112
|
+
│ │ ├── chapter-01.md
|
|
113
|
+
│ │ ├── chapter-02.md
|
|
114
|
+
│ │ └── ...
|
|
115
|
+
│ ├── glossary-used.json # 本次使用的术语快照
|
|
116
|
+
│ └── translation-report.md # 翻译报告
|
|
117
|
+
└── ja/ # 日文版
|
|
118
|
+
└── ...
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## 术语表格式
|
|
122
|
+
|
|
123
|
+
术语表存储在 `.specify/translation/glossary.json`,格式如下:
|
|
124
|
+
|
|
125
|
+
```json
|
|
126
|
+
{
|
|
127
|
+
"version": "1.0",
|
|
128
|
+
"story": "my-novel",
|
|
129
|
+
"categories": {
|
|
130
|
+
"characters": [
|
|
131
|
+
{
|
|
132
|
+
"zh": "李明",
|
|
133
|
+
"en": "Li Ming",
|
|
134
|
+
"ja": "リ・ミン",
|
|
135
|
+
"notes": "主角"
|
|
136
|
+
}
|
|
137
|
+
],
|
|
138
|
+
"places": [...],
|
|
139
|
+
"skills": [...],
|
|
140
|
+
"items": [...],
|
|
141
|
+
"concepts": [...]
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
## 翻译质量保证
|
|
147
|
+
|
|
148
|
+
### 自动检查项
|
|
149
|
+
|
|
150
|
+
- ✅ **术语一致性** - glossary 中的术语 100% 统一
|
|
151
|
+
- ✅ **段落对应** - 原文和译文段落数一致
|
|
152
|
+
- ✅ **长度合理性** - 中→英 +20-50%,中→日 -10-20%
|
|
153
|
+
- ✅ **特殊符号** - 引号、书名号正确转换
|
|
154
|
+
- ✅ **未定义术语** - 检测专有名词并提示添加
|
|
155
|
+
|
|
156
|
+
### 警告示例
|
|
157
|
+
|
|
158
|
+
```
|
|
159
|
+
翻译完成!
|
|
160
|
+
|
|
161
|
+
术语应用:85/85(100%)
|
|
162
|
+
|
|
163
|
+
⚠️ 警告:
|
|
164
|
+
第 3 章第 12 段:检测到未定义术语"天灵根"(出现 5 次)
|
|
165
|
+
建议:/glossary add "天灵根|Heavenly Spirit Root"
|
|
166
|
+
|
|
167
|
+
第 7 章:译文长度异常(原文 3200 字,译文 6100 词,+90%)
|
|
168
|
+
可能原因:过度解释
|
|
169
|
+
建议:人工检查润色
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
## 常见问题
|
|
173
|
+
|
|
174
|
+
### Q: 如何确保角色名翻译统一?
|
|
175
|
+
|
|
176
|
+
A: 翻译前先用 `/glossary init` 初始化术语表,然后添加所有主要角色名。系统会自动在翻译时应用这些术语。
|
|
177
|
+
|
|
178
|
+
### Q: 翻译质量如何?
|
|
179
|
+
|
|
180
|
+
A: 使用两遍翻译策略(直译 + 润色)+ 文化适应处理,质量远超 Google 翻译。建议先用 `/translate-preview` 预览效果。
|
|
181
|
+
|
|
182
|
+
### Q: 可以翻译多长的文本?
|
|
183
|
+
|
|
184
|
+
A: 支持任意长度。系统会自动分段(每段 ~2000 字),并附带上下文,确保翻译质量和连贯性。
|
|
185
|
+
|
|
186
|
+
### Q: 如何处理文化特定表达?
|
|
187
|
+
|
|
188
|
+
A: AI 会自动识别成语、典故、称呼等,并进行文化适应处理。复杂情况会标记待人工确认。
|
|
189
|
+
|
|
190
|
+
## 与其他命令集成
|
|
191
|
+
|
|
192
|
+
- **与 /write 集成** - 写完章节后自动提示是否翻译
|
|
193
|
+
- **与 /export 集成** - 导出时可选择翻译版本
|
|
194
|
+
- **与 /analyze 集成** - 分析翻译质量和术语一致性
|
|
195
|
+
|
|
196
|
+
## 专家
|
|
197
|
+
|
|
198
|
+
### expert:literary-translator - 文学翻译专家
|
|
199
|
+
|
|
200
|
+
精通中英日文学翻译,保持文学性与风格一致性。可以直接调用:
|
|
201
|
+
|
|
202
|
+
```
|
|
203
|
+
@expert:literary-translator 请帮我翻译这段文字...
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
## 技术细节
|
|
207
|
+
|
|
208
|
+
### 智能分段策略
|
|
209
|
+
|
|
210
|
+
```
|
|
211
|
+
输入:30 万字小说
|
|
212
|
+
↓
|
|
213
|
+
按章节分割(每章 3000-5000 字)
|
|
214
|
+
↓
|
|
215
|
+
每章再按段落分组(每组 ~2000 字)
|
|
216
|
+
↓
|
|
217
|
+
每组翻译时附带:
|
|
218
|
+
- 前 200 字上下文(已翻译部分)
|
|
219
|
+
- 后 200 字预览(原文)
|
|
220
|
+
- 术语表
|
|
221
|
+
↓
|
|
222
|
+
两遍翻译:
|
|
223
|
+
第一遍:直译(准确性优先)
|
|
224
|
+
第二遍:润色(流畅性优先)
|
|
225
|
+
↓
|
|
226
|
+
术语一致性检查
|
|
227
|
+
↓
|
|
228
|
+
输出翻译结果
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
### 术语预处理策略
|
|
232
|
+
|
|
233
|
+
```
|
|
234
|
+
原文:李明走进青云宗的大门
|
|
235
|
+
↓
|
|
236
|
+
预处理(术语替换为占位符):
|
|
237
|
+
{{CHAR_001}}走进{{PLACE_001}}的大门
|
|
238
|
+
↓
|
|
239
|
+
翻译:
|
|
240
|
+
{{CHAR_001}} walked through the gates of {{PLACE_001}}
|
|
241
|
+
↓
|
|
242
|
+
还原(占位符替换为标准译名):
|
|
243
|
+
Li Ming walked through the gates of Azure Cloud Sect
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
## 成功标准
|
|
247
|
+
|
|
248
|
+
**用户反馈目标:**
|
|
249
|
+
- "术语终于统一了,不用自己一个个检查"
|
|
250
|
+
- "翻译质量比 Google 翻译好太多"
|
|
251
|
+
- "几小时翻译完一本书,以前要几个月"
|
|
252
|
+
|
|
253
|
+
**技术指标:**
|
|
254
|
+
- 术语一致性:100%(自动保证)
|
|
255
|
+
- 翻译流畅度:> 8/10(人工评分)
|
|
256
|
+
- 翻译速度:< 2 分钟/千字
|
|
257
|
+
- 信息完整性:> 95%(段落对应)
|
|
258
|
+
|
|
259
|
+
## 许可证
|
|
260
|
+
|
|
261
|
+
MIT License
|
|
262
|
+
|
|
263
|
+
## 贡献
|
|
264
|
+
|
|
265
|
+
欢迎提交 Issue 和 Pull Request!
|