Visual novel script localization tool
Project description
toto
A visual novel script localization tool. toto extracts translatable text from various VN engine script formats, manages translations, and reinserts translated text back into script files.
Supported engines
| Engine | Handler | File types |
|---|---|---|
| KiriKiri | kirikiri |
.ks, .soc |
| DxLib | dxlib |
binary scripts |
| Anim | anim |
.dat |
| mgos (μ-GameOperationSystem) | mgos |
.o |
| AGSD (NicotineSoft) | agsd |
.spt |
| AdvHD (Willplus) | advhd |
.ws2 |
Installation
pip install toto-script-tool
Or for development:
pip install hatch
hatch env create
Usage
Extract
Extract translatable text from script files:
toto extract --filetype=kirikiri path/to/scripts/
Options:
--filetype(required) — engine format (see table above)--outpath— where to write translation files (default:./project/source/)--workpath— where to store intermediate files (default:./working/)--codec— force a specific text encoding--ignore-line-regex— regex pattern to skip matching lines (repeatable)--unwrap— remove inline line breaks from extracted text for re-wrapping on insertion (supported formats:agsd)
Insert
Reinsert translated text into script files:
toto insert --filetype=kirikiri path/to/translations/
Options:
--filetype(required) — engine format--outpath— where to write patched scripts (default:./patch/)--workpath— intermediate file directory (default:./working/)--width— line width for text wrapping (default: 60; supported formats:agsd,kirikiri)--wrap— wrapping mode (supported formats:agsd,kirikiri)--codec— force output encoding--skip-identical— skip files where all translations match the original
Workflow
- Extract translatable text from original scripts. This produces translation files (plain text, one line per string) and intermediate files with placeholder tokens.
- Translate the extracted text files — by hand, with MT, or however you like.
- Insert the translations back. toto substitutes translated text into the intermediate files to produce patched scripts ready for use.
Related tools
tamago can create and extract archive files for VN engines supported by toto, completing the translation workflow: unpack archives with tamago, extract and translate scripts with toto, then repack with tamago.
Adding format handlers
toto uses a plugin system based on Python entry points. To add support for a new engine format:
- Create a handler class that extends
toto.filetypes.TranslatableFile.TranslatableFile - Implement
get_paths(),extract_lines(), andinsert_lines() - Register it as an entry point under
toto.filetypesinpyproject.toml
Development
# Run tests
hatch run test
# Run a specific test
hatch run test -- -k "test_name"
# Lint and format
hatch run lint:style # check
hatch run lint:fmt # auto-format
hatch run lint:typing # mypy
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file toto_script_tool-1.0.0.tar.gz.
File metadata
- Download URL: toto_script_tool-1.0.0.tar.gz
- Upload date:
- Size: 52.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
67cf050f790a94138e95789a61e63d33100472b11dee0ed6ad7907bbf9e33f1a
|
|
| MD5 |
0d24f81791f947452da255d48fc7ec1d
|
|
| BLAKE2b-256 |
7271930bbe973695087d2db8477bc68892d567a4843eff4f7d5f275ffe587ae3
|
Provenance
The following attestation bundles were made for toto_script_tool-1.0.0.tar.gz:
Publisher:
publish.yml on kenkyuuka/toto
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
toto_script_tool-1.0.0.tar.gz -
Subject digest:
67cf050f790a94138e95789a61e63d33100472b11dee0ed6ad7907bbf9e33f1a - Sigstore transparency entry: 1333955345
- Sigstore integration time:
-
Permalink:
kenkyuuka/toto@96d28656d2f47aecabb1b781cc5660e3f00e2027 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/kenkyuuka
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@96d28656d2f47aecabb1b781cc5660e3f00e2027 -
Trigger Event:
release
-
Statement type:
File details
Details for the file toto_script_tool-1.0.0-py3-none-any.whl.
File metadata
- Download URL: toto_script_tool-1.0.0-py3-none-any.whl
- Upload date:
- Size: 30.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
81126c79e60879b4837106daed130b8981514a88eddd7cbd0f47a6332f642ab6
|
|
| MD5 |
30aa9bd15a64d71902e675e2d6a41f20
|
|
| BLAKE2b-256 |
fe886d829096e6eaca6fc5fea4f54f9b2e1eb48f51f49461448a5c74309bbdee
|
Provenance
The following attestation bundles were made for toto_script_tool-1.0.0-py3-none-any.whl:
Publisher:
publish.yml on kenkyuuka/toto
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
toto_script_tool-1.0.0-py3-none-any.whl -
Subject digest:
81126c79e60879b4837106daed130b8981514a88eddd7cbd0f47a6332f642ab6 - Sigstore transparency entry: 1333955450
- Sigstore integration time:
-
Permalink:
kenkyuuka/toto@96d28656d2f47aecabb1b781cc5660e3f00e2027 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/kenkyuuka
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@96d28656d2f47aecabb1b781cc5660e3f00e2027 -
Trigger Event:
release
-
Statement type: