@yangda611/dsh-scriptor 8.4.8 → 8.4.9
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/README.md
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
# Webnovel Writer · 网文写作工作台
|
|
2
2
|
|
|
3
|
-
Scriptor 8.4.
|
|
3
|
+
Scriptor 8.4.9 适配 DSH 0.2.2-rc.1。安装范围为 `>=0.2.2-rc.1 <0.3.0-0`,Node最低24.9;实际验证按具体版本记录。
|
|
4
4
|
|
|
5
5
|
[产品主页](https://yangda611.github.io/dsh-scriptor-full/) · [新手教程](https://yangda611.github.io/dsh-scriptor-full/docs/beginner.html)
|
|
6
6
|
|
|
7
|
-
> Scriptor 8.4.
|
|
7
|
+
> Scriptor 8.4.9 配套 **DSH 0.2.2-rc.1**。旧格式先备份并使用书仓维护预览,按明确批准执行升级。
|
|
8
8
|
|
|
9
|
-
DSH 插件 `@yangda611/dsh-scriptor` 提供写作工作台。8.4.
|
|
9
|
+
DSH 插件 `@yangda611/dsh-scriptor` 提供写作工作台。8.4.9包含14个写作与维护技能和八个脚本入口。
|
|
10
10
|
要求 Node.js至少24.9,DSH 0.2.2-rc.1。许可证 GPL-3.0-only。
|
|
11
11
|
|
|
12
12
|
## 安装
|
|
13
13
|
|
|
14
|
-
在 DSH 0.2.2-rc.1 桌面端侧栏打开“插件 → 添加插件”,输入 `@yangda611/dsh-scriptor@8.4.
|
|
14
|
+
在 DSH 0.2.2-rc.1 桌面端侧栏打开“插件 → 添加插件”,输入 `@yangda611/dsh-scriptor@8.4.9`,核对后安装并应用变更。桌面端自带运行时,不需要另外安装 Node/pnpm。
|
|
15
15
|
|
|
16
16
|
以下是进阶用户创建独立 Web profile 的方式,不用于桌面端保留的 `desktop` profile:
|
|
17
17
|
|
|
18
18
|
```powershell
|
|
19
19
|
dsh --profile webnovel --from-default-profile web --dump-config
|
|
20
|
-
dsh plugin --profile webnovel add C:/scriptor-dist/yangda611-dsh-scriptor-8.4.
|
|
20
|
+
dsh plugin --profile webnovel add C:/scriptor-dist/yangda611-dsh-scriptor-8.4.9.tgz
|
|
21
21
|
dsh --profile webnovel --host 127.0.0.1 --port 6104 --no-open
|
|
22
22
|
```
|
|
23
23
|
|
|
@@ -27,7 +27,7 @@ dsh --profile webnovel --host 127.0.0.1 --port 6104 --no-open
|
|
|
27
27
|
|
|
28
28
|
## 更新与卸载
|
|
29
29
|
|
|
30
|
-
先停止指定 profile 的运行实例,再安装目标精确版本并重启(本版为 `C:/scriptor-dist/yangda611-dsh-scriptor-8.4.
|
|
30
|
+
先停止指定 profile 的运行实例,再安装目标精确版本并重启(本版为 `C:/scriptor-dist/yangda611-dsh-scriptor-8.4.9.tgz`)。
|
|
31
31
|
卸载后可执行上面的安装命令重装:
|
|
32
32
|
|
|
33
33
|
```powershell
|
|
@@ -37,7 +37,9 @@ dsh --profile webnovel --dump-config
|
|
|
37
37
|
|
|
38
38
|
卸载插件不会删除作品书仓。安装不需要源码、安装时构建或 npm 账号。tarball 放在无空格目录,并核对对应 Release 提供的 SHA256。首次下载宿主依赖仍可能需要网络。
|
|
39
39
|
|
|
40
|
-
## 8.4.
|
|
40
|
+
## 8.4.9 更新与旧项目升级
|
|
41
|
+
|
|
42
|
+
短剧单集渲染现在会核对作品契约并保存到 `草稿区/剧本/短剧/集NNN.md`,读回内容一致后才报告保存成功。结果中的 `path` 是实际草稿路径,`finalPath` 是未来定稿路径;草稿仍须节拍检查、审读和作者确认。缺失或类型错误的嵌套字段会得到具体诊断。完整变更见仓库 CHANGELOG。
|
|
41
43
|
|
|
42
44
|
本二开版保持原有的千章关系星团、证据轨迹、原生设置与书仓维护能力。先升级到 DSH 0.2.2-rc.1,再更新已用插件。旧格式须先备份,检查并预览整仓升级;正常读取不再转换旧字段。升级后新建写作模式对话,打开原工作区继续;旧对话不会自动迁移。
|
|
43
45
|
|
|
@@ -45,11 +47,11 @@ dsh --profile webnovel --dump-config
|
|
|
45
47
|
|
|
46
48
|
**旧项目升级后请补充并确认作品契约的章节篇幅**:保留“阅读体验与情绪承诺”原内容,追加目标汉字数与宽松上下限,经原契约工具保存确认。未配置仍可使用,但不启用范围核对。脚本按实际正文汉字数检查,越界沿原文本规范发现项处置,不增加审批步骤。见 [升级与备份](https://github.com/yangda611/dsh-scriptor-full/blob/main/docs/user/upgrade-backup.md)。
|
|
47
49
|
|
|
48
|
-
|
|
50
|
+
本次检索与桌宠为兼容发行,无新增功能。检索已包含在主包内;桌宠独立可选;full 与主包相同,不包含桌宠,不与主包入口重复安装。
|
|
49
51
|
|
|
50
52
|
## 公开文档
|
|
51
53
|
|
|
52
|
-
当前主包 8.4.
|
|
54
|
+
当前主包 8.4.9。完整的安装、配置、首章和备份教程见 [公开使用文档](https://github.com/yangda611/dsh-scriptor-full/tree/main/docs/user)。
|
|
53
55
|
|
|
54
56
|
第三方组件的原始声明见 [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md),许可证文本随包放在 licenses/。源码及校验和由对应的 GitHub Release 提供。
|
|
55
57
|
|
package/lib/cli.js
CHANGED
|
@@ -15972,11 +15972,19 @@ function runScreenplayReview(input) {
|
|
|
15972
15972
|
}
|
|
15973
15973
|
|
|
15974
15974
|
// ../core/src/shortdrama/types.ts
|
|
15975
|
+
var SHORTDRAMA_ORIENTATIONS = ["\u7AD6\u5C4F", "\u6A2A\u5C4F"];
|
|
15976
|
+
var HOOK_TYPES = ["\u8EAB\u4EFD", "\u60C5\u611F", "\u987F\u609F"];
|
|
15975
15977
|
var HOOK_ROTATION = ["\u8EAB\u4EFD", "\u60C5\u611F", "\u987F\u609F"];
|
|
15976
15978
|
function hookTypeForEpisode(\u96C6) {
|
|
15977
15979
|
if (!Number.isSafeInteger(\u96C6) || \u96C6 < 1) throw new Error(`\u96C6\u53F7\u5FC5\u987B\u662F\u6B63\u6574\u6570\uFF08\u6536\u5230\uFF1A${String(\u96C6)}\uFF09`);
|
|
15978
15980
|
return HOOK_ROTATION[(\u96C6 - 1) % HOOK_ROTATION.length];
|
|
15979
15981
|
}
|
|
15982
|
+
function isHookType(value) {
|
|
15983
|
+
return typeof value === "string" && HOOK_TYPES.includes(value);
|
|
15984
|
+
}
|
|
15985
|
+
function isShortDramaOrientation(value) {
|
|
15986
|
+
return typeof value === "string" && SHORTDRAMA_ORIENTATIONS.includes(value);
|
|
15987
|
+
}
|
|
15980
15988
|
|
|
15981
15989
|
// ../core/src/shortdrama/templates.ts
|
|
15982
15990
|
var SHORTDRAMA_SOURCES = {
|
|
@@ -16242,7 +16250,74 @@ function isBeatMark(mark) {
|
|
|
16242
16250
|
function fail2(message) {
|
|
16243
16251
|
throw new Error(`\u5355\u96C6\u5267\u672C\u6E32\u67D3\u5931\u8D25\uFF1A${message}`);
|
|
16244
16252
|
}
|
|
16253
|
+
function requireRecord(value, field) {
|
|
16254
|
+
if (value === null || typeof value !== "object" || Array.isArray(value)) fail2(`${field}\u5FC5\u987B\u662F\u4E00\u4E2A\u5BF9\u8C61`);
|
|
16255
|
+
return value;
|
|
16256
|
+
}
|
|
16257
|
+
function requireArray(value, field) {
|
|
16258
|
+
if (!Array.isArray(value)) fail2(`${field}\u5FC5\u987B\u662F\u4E00\u4E2A\u6570\u7EC4`);
|
|
16259
|
+
return value;
|
|
16260
|
+
}
|
|
16261
|
+
function requireString(value, field) {
|
|
16262
|
+
if (typeof value !== "string") fail2(`${field}\u5FC5\u987B\u662F\u5B57\u7B26\u4E32`);
|
|
16263
|
+
}
|
|
16264
|
+
function requireNumber(value, field) {
|
|
16265
|
+
if (typeof value !== "number") fail2(`${field}\u5FC5\u987B\u662F\u6570\u5B57`);
|
|
16266
|
+
}
|
|
16267
|
+
function requireStringArray(value, field) {
|
|
16268
|
+
for (const [index, item] of requireArray(value, field).entries()) requireString(item, `${field}[${index}]`);
|
|
16269
|
+
}
|
|
16270
|
+
function validateLines(value, field) {
|
|
16271
|
+
for (const [index, item] of requireArray(value, field).entries()) {
|
|
16272
|
+
const where = `${field}[${index}]`;
|
|
16273
|
+
const line = requireRecord(item, where);
|
|
16274
|
+
requireString(line["\u89D2\u8272"], `${where}.\u89D2\u8272`);
|
|
16275
|
+
requireString(line["\u53F0\u8BCD"], `${where}.\u53F0\u8BCD`);
|
|
16276
|
+
if (line["\u62EC\u53F7\u63D0\u793A"] !== void 0) requireString(line["\u62EC\u53F7\u63D0\u793A"], `${where}.\u62EC\u53F7\u63D0\u793A`);
|
|
16277
|
+
}
|
|
16278
|
+
}
|
|
16279
|
+
function validateStructure(input) {
|
|
16280
|
+
const value = requireRecord(input, "\u53C2\u6570");
|
|
16281
|
+
for (const field of ["\u6807\u9898", "\u6838\u5FC3\u60F3\u6CD5", "\u723D\u70B9", "\u7ED3\u5C3E\u60AC\u5FF5"]) requireString(value[field], field);
|
|
16282
|
+
if (!isShortDramaOrientation(value["\u753B\u5E45"])) fail2("\u753B\u5E45\u5FC5\u987B\u662F\u7AD6\u5C4F\u6216\u6A2A\u5C4F");
|
|
16283
|
+
if (!isHookType(value["\u94A9\u5B50\u7C7B\u578B"])) fail2("\u94A9\u5B50\u7C7B\u578B\u5FC5\u987B\u662F\u8EAB\u4EFD\u3001\u60C5\u611F\u6216\u987F\u609F");
|
|
16284
|
+
for (const field of ["\u5F00\u573A\u51B2\u7A81\u79D2", "\u7ED3\u5C3E\u94A9\u5B50\u79D2"]) requireNumber(value[field], field);
|
|
16285
|
+
for (const [index, second] of requireArray(value["\u53CD\u8F6C\u79D2"], "\u53CD\u8F6C\u79D2").entries()) requireNumber(second, `\u53CD\u8F6C\u79D2[${index}]`);
|
|
16286
|
+
for (const [index, item] of requireArray(value["\u573A\u666F"], "\u573A\u666F").entries()) {
|
|
16287
|
+
const where = `\u573A\u666F[${index}]`;
|
|
16288
|
+
const scene = requireRecord(item, where);
|
|
16289
|
+
for (const field of ["\u5730\u70B9", "\u65F6\u95F4", "\u52A8\u4F5C"]) requireString(scene[field], `${where}.${field}`);
|
|
16290
|
+
if (scene["\u5185\u5916"] !== "\u5185" && scene["\u5185\u5916"] !== "\u5916") fail2(`${where}.\u5185\u5916\u5FC5\u987B\u662F\u5185\u6216\u5916`);
|
|
16291
|
+
validateLines(scene["\u53F0\u8BCD"], `${where}.\u53F0\u8BCD`);
|
|
16292
|
+
if (scene["\u573A\u666F\u73AF\u5883"] !== void 0) requireString(scene["\u573A\u666F\u73AF\u5883"], `${where}.\u573A\u666F\u73AF\u5883`);
|
|
16293
|
+
if (scene["\u4EBA\u7269"] !== void 0) {
|
|
16294
|
+
for (const [personIndex, personItem] of requireArray(scene["\u4EBA\u7269"], `${where}.\u4EBA\u7269`).entries()) {
|
|
16295
|
+
const personWhere = `${where}.\u4EBA\u7269[${personIndex}]`;
|
|
16296
|
+
const person = requireRecord(personItem, personWhere);
|
|
16297
|
+
requireString(person["\u89D2\u8272"], `${personWhere}.\u89D2\u8272`);
|
|
16298
|
+
if (person["\u5F62\u8C61\u6807\u8BC6"] !== void 0) requireString(person["\u5F62\u8C61\u6807\u8BC6"], `${personWhere}.\u5F62\u8C61\u6807\u8BC6`);
|
|
16299
|
+
}
|
|
16300
|
+
}
|
|
16301
|
+
if (scene["\u955C\u5934"] !== void 0) {
|
|
16302
|
+
for (const [shotIndex, shotItem] of requireArray(scene["\u955C\u5934"], `${where}.\u955C\u5934`).entries()) {
|
|
16303
|
+
const shotWhere = `${where}.\u955C\u5934[${shotIndex}]`;
|
|
16304
|
+
const shot = requireRecord(shotItem, shotWhere);
|
|
16305
|
+
requireNumber(shot["\u955C\u5934\u53F7"], `${shotWhere}.\u955C\u5934\u53F7`);
|
|
16306
|
+
for (const field of ["\u5F00\u59CB\u79D2", "\u7ED3\u675F\u79D2"]) {
|
|
16307
|
+
if (shot[field] !== null) requireNumber(shot[field], `${shotWhere}.${field}\uFF08\u672A\u77E5\u65F6\u586B null\uFF09`);
|
|
16308
|
+
}
|
|
16309
|
+
for (const field of ["\u666F\u522B", "\u89D2\u5EA6", "\u8FD0\u955C"]) requireString(shot[field], `${shotWhere}.${field}`);
|
|
16310
|
+
requireStringArray(shot["\u63CF\u5199"], `${shotWhere}.\u63CF\u5199`);
|
|
16311
|
+
validateLines(shot["\u53F0\u8BCD"], `${shotWhere}.\u53F0\u8BCD`);
|
|
16312
|
+
for (const field of ["\u73AF\u5883\u58F0", "\u5B57\u5E55"]) {
|
|
16313
|
+
if (shot[field] !== void 0) requireStringArray(shot[field], `${shotWhere}.${field}`);
|
|
16314
|
+
}
|
|
16315
|
+
}
|
|
16316
|
+
}
|
|
16317
|
+
}
|
|
16318
|
+
}
|
|
16245
16319
|
function validate(input) {
|
|
16320
|
+
validateStructure(input);
|
|
16246
16321
|
const warnings = [];
|
|
16247
16322
|
const template = RHYTHM_TEMPLATES[input.\u753B\u5E45];
|
|
16248
16323
|
if (!Number.isSafeInteger(input.\u96C6) || input.\u96C6 < 1 || input.\u96C6 > 100) {
|