Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ST_regex

繁體中文 | English


繁體中文

這是一個專為 SillyTavern (酒館) 角色卡設計的輕量化工具,用於從角色卡 JSON 檔案中提取正則表達式 (Regex) 腳本,並支援編輯後重新打包。

功能特點

  • Regex 提取:將 JSON 角色卡中的所有正則腳本拆解為獨立的 .json 檔案。
  • 狀態欄提取:自動提取 Regex 中的狀態欄 HTML 內容至 status_bar.html,方便直接編輯。
  • 重新打包:支援將編輯後的正則腳本重新封裝回角色卡 JSON。
  • CLI 支援:支援全域指令執行,操作更直覺。

安裝步驟

  1. 確保電腦已安裝 Node.js
  2. 克隆此倉庫:
    git clone https://github.com/boriseho/ST_regex.git
    cd ST_regex
  3. 安裝依賴並連結指令:
    npm install
    npm link

使用方法

1. 拆解角色卡 (提取正則)

st-unpack <角色卡路徑.json>
  • 提取後的檔案將存放在 ./output/<角色卡名稱>/ 目錄下。

2. 打包角色卡 (更新正則)

st-pack <原始角色卡路徑.json> <正則目錄路徑>

English

A lightweight tool designed for SillyTavern character cards to extract Regex scripts from JSON files and support repacking after editing.

Features

  • Regex Extraction: Unpack all regex scripts from JSON character cards into individual .json files.
  • Status Bar Extraction: Automatically extract Status Bar HTML content from Regex to status_bar.html for easy editing.
  • Repacking: Support repacking edited regex scripts back into the character card JSON.
  • CLI Support: Global command-line interface for intuitive operation.

Installation

  1. Ensure Node.js is installed.
  2. Clone this repository:
    git clone https://github.com/boriseho/ST_regex.git
    cd ST_regex
  3. Install dependencies and link commands:
    npm install
    npm link

Usage

1. Unpack Character Card (Extract Regex)

st-unpack <path_to_character.json>
  • Extracted files will be stored in the ./output/<character_name>/ directory.

2. Pack Character Card (Update Regex)

st-pack <original_json_path> <regex_directory_path>

License

MIT License

About

SillyTavern 角色卡正則提取與打包工具,支援獨立提取狀態欄 HTML。 (Lightweight tool for extracting and packing SillyTavern character card regex scripts.)

Topics

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages