Skip to main content

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
ADVDX (BLACKRAINBOW) blackrainbow .spt (unpacked from *_spt.dat / script.dat with tamago)

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, blackrainbow, dxlib; on by default for blackrainbow and dxlib)
  • --key — hex encryption key for formats that need one (blackrainbow: the message key; by default the known keys are tried)

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: the handler's own, usually 60; supported formats: agsd, blackrainbow, dxlib, kirikiri)
  • --wrap — wrapping mode (supported formats: agsd, kirikiri)
  • --codec — force output encoding
  • --skip-identical — skip files where all translations match the original

Workflow

  1. Extract translatable text from original scripts. This produces translation files (plain text, one line per string) and intermediate files with placeholder tokens.
  2. Translate the extracted text files — by hand, with MT, or however you like.
  3. Insert the translations back. toto substitutes translated text into the intermediate files to produce patched scripts ready for use.

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:

  1. Create a handler class that extends toto.filetypes.TranslatableFile.TranslatableFile
  2. Implement get_paths(), extract_lines(), and insert_lines()
  3. Register it as an entry point under toto.filetypes in pyproject.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

Metadata

Release files for toto-script-tool 1.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for toto-script-tool 1.2.0
File Size Uploaded Provenance Actions
toto_script_tool-1.2.0.tar.gz 93.7 kB With provenance Details for toto_script_tool-1.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for toto-script-tool 1.2.0
File Interpreter ABI Platform Actions
toto_script_tool-1.2.0-py3-none-any.whl Python 3 none any Details for toto_script_tool-1.2.0-py3-none-any.whl

Total release size: 143.6 kB

Release files / toto_script_tool-1.2.0.tar.gz

Download URL toto_script_tool-1.2.0.tar.gz
Size 93.7 kB
Tags Source
SHA-256 checksum
How to use checksums
77fe0dd73db1a296736501126818d8c7cc84d01cf705160934d3fa0010fbbab0
BLAKE2b-256 checksum
How to use checksums
05c5aec2509b7afa230cb30516a8f9fce7344f3089298b245035d9f71894c843
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.

Transparency log

Release files / toto_script_tool-1.2.0-py3-none-any.whl

Download URL toto_script_tool-1.2.0-py3-none-any.whl
Size 50.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
57128653278936858f20fa8754f89b3b670a74d54fe01338768fb0e6225d7b80
BLAKE2b-256 checksum
How to use checksums
c7f9eb1fc7e774e957471bf9fb26c28b7366497b3809f0a20fd50712ee67b583
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.

Transparency log

Security for toto-script-tool 1.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for toto_script_tool-1.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page