Python wrapper for TextractorCLI
Project description
textractor-py
Python wrapper for TextractorCLI.
textractor-py provides a simple Python interface for attaching to a running Visual Novel process with TextractorCLI and receiving extracted text directly from Python.
Currently supports Windows only and no future linux build planned for now.
Features
- Attach to a running process by PID
- Listen for text from specific hooks
- Automatic architecture detection (x86/x64)
- Bundles TextractorCLI binaries
- Simple generator-based API
Installation
pip install textractor-py
Quick Start
from textractor_py import Textractor
tex = Textractor()
tex.attach(2764) #PID of a VN process
print("attached, listening...")
for line in tex.listen(
hook="HW-4*14", #optional
pid=2764
):
print(line)
Example output:
(2764, "HW-4*14", "こんにちは")
(2764, "HW-4*14", "世界")
API
Textractor()
Creates a Textractor instance.
tex = Textractor()
attach(pid)
Attach Textractor to a running process.
tex.attach(2764)
detach(pid)
Detach Textractor from a process.
tex.detach(2764)
listen(...)
Listen for extracted text.
Example:
for line in tex.listen(
hook="HW-4*14", #optional
pid=2764 #You do have the option to set it to 0 in order to listen to everything
):
print(line)
Returns tuples of:
(pid, hook, text)
Requirements
- Windows
- Python 3.10+
- A running target process
Notes
This package is a Python wrapper around TextractorCLI and is intended primarily for visual novel text extraction, translation tooling, language learning tools, and related automation.
License
GPL-2.0 License
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 textractor_py-0.1.1.tar.gz.
File metadata
- Download URL: textractor_py-0.1.1.tar.gz
- Upload date:
- Size: 20.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0819f27adc5fc03d6bba7c41e237438b1f89d94a32a771d270af650d222ebce7
|
|
| MD5 |
bcb31b091d86359c4d8d5b626209a6a8
|
|
| BLAKE2b-256 |
ffd83cbdaa54565d9c9ce34ce091502cb6e3e3e49bec828dcd63b8dad18d744e
|
File details
Details for the file textractor_py-0.1.1-py3-none-any.whl.
File metadata
- Download URL: textractor_py-0.1.1-py3-none-any.whl
- Upload date:
- Size: 21.5 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fed7543a95adf962dd51d3c0f4c5c5e2e4c9f58c31d376cb20d82f2d2d3858fc
|
|
| MD5 |
569d7648ac34b0b4b3899187c271ee03
|
|
| BLAKE2b-256 |
6f9c5e6bf56a7d7885de397a3bbc5517b3fc1bf33d1b6864497f4a370f333a21
|