這是一個專為 SillyTavern (酒館) 角色卡設計的輕量化工具,用於從角色卡 JSON 檔案中提取正則表達式 (Regex) 腳本,並支援編輯後重新打包。
- Regex 提取:將 JSON 角色卡中的所有正則腳本拆解為獨立的
.json檔案。 - 狀態欄提取:自動提取 Regex 中的狀態欄 HTML 內容至
status_bar.html,方便直接編輯。 - 重新打包:支援將編輯後的正則腳本重新封裝回角色卡 JSON。
- CLI 支援:支援全域指令執行,操作更直覺。
- 確保電腦已安裝 Node.js。
- 克隆此倉庫:
git clone https://github.com/boriseho/ST_regex.git cd ST_regex - 安裝依賴並連結指令:
npm install npm link
st-unpack <角色卡路徑.json>- 提取後的檔案將存放在
./output/<角色卡名稱>/目錄下。
st-pack <原始角色卡路徑.json> <正則目錄路徑>A lightweight tool designed for SillyTavern character cards to extract Regex scripts from JSON files and support repacking after editing.
- Regex Extraction: Unpack all regex scripts from JSON character cards into individual
.jsonfiles. - Status Bar Extraction: Automatically extract Status Bar HTML content from Regex to
status_bar.htmlfor easy editing. - Repacking: Support repacking edited regex scripts back into the character card JSON.
- CLI Support: Global command-line interface for intuitive operation.
- Ensure Node.js is installed.
- Clone this repository:
git clone https://github.com/boriseho/ST_regex.git cd ST_regex - Install dependencies and link commands:
npm install npm link
st-unpack <path_to_character.json>- Extracted files will be stored in the
./output/<character_name>/directory.
st-pack <original_json_path> <regex_directory_path>MIT License