Files
bettergi-scripts-list/repo/js/LinneaMining/tools/README.md
2026-05-29 12:49:22 +00:00

50 lines
1.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
此目录下的文件为工具脚本,与主脚本的运行无关,仅用于开发时批量处理路线信息。
---
## split-routes.js
将包含多个传送点(`teleport`)的路线拆分为独立子路线,方便打 tag 管理。
```bash
node split-routes.js
```
拆分后自动运行 `reindex-positions.js`
## merge-routes.js
将拆分后的子路线(`名称-01.json``名称-02.json`...重新合并为父路线tags 自动合并去重。
```bash
node merge-routes.js
```
合并后自动运行 `reindex-positions.js`
## reindex-positions.js
将所有路线文件中 positions 的 `id` 按数组顺序重新赋值1, 2, 3...),附带 BOM 清理。
```bash
node reindex-positions.js
```
## update-bgi-version.js
批量更新路线文件中 `info.bgi_version`,补充缺失的 `info.version`,附带 BOM 清理。修改脚本中的 `newVersion` 常量后运行。
```bash
node update-bgi-version.js
```
## rename-tag.js
将路线文件中匹配指定 tag 替换为新 tag精确匹配单个元素。修改脚本中的 `oldTag``newTag` 后运行。
```bash
node rename-tag.js
```
## cleanup-fields.js
批量删除路线文件中的 `config``farming_info` 字段,附带 BOM 清理。
```bash
node cleanup-fields.js
```