Add your description here
Project description
Texthooker proxy
This is a very simple utility tool that listens on websocket connections and forwards them to renji's texthooker-ui website (or any other arbitrary websocket client).
Installation
You need Python for this.
pip install texthooker_proxy
Usage
By default, it attempts to connect to the default localhost:6677 address.
texthooker_proxy
You can also supply custom parameters:
texthooker_proxy --host localhost --port 6678
Scripts for websites
The following scripts are used to hook to VNs on the web. For each of them, you must open the browser
console and paste the corresponding script. Usually, the common keybind is Ctrl + Shift + I, and then
click on "Console" and you can paste the code.
Nostalgic Visual Novels on-line
For tss.asenheim.org:
// Open WebSocket connection to your proxy server.
// This address should match the proxy's
const socket = new WebSocket('ws://localhost:6677');
// When the connection is open, mark this client as the data source
socket.onopen = () => {
console.log('Connected to WebSocket server.');
socket.send('notrenji');
sendTextContainerContent(); // Send initial content
};
// All dialogue is in #text_container
function sendTextContainerContent() {
const textContainer = document.getElementById('text_container');
if (textContainer && socket.readyState === WebSocket.OPEN) {
socket.send(textContainer.textContent);
console.log('Sent:', textContainer.textContent);
}
}
// Watch for changes
const observer = new MutationObserver(sendTextContainerContent);
const textContainer = document.getElementById('text_container');
if (textContainer) {
observer.observe(textContainer, {
childList: true,
subtree: true,
characterData: true
});
}
socket.onmessage = (event) => {
console.log('Received:', event.data);
};
socket.onerror = (error) => {
console.error('WebSocket error:', error);
};
socket.onclose = () => {
console.log('WebSocket connection closed');
};
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 texthooker_proxy-0.1.0.tar.gz.
File metadata
- Download URL: texthooker_proxy-0.1.0.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
08fed26cfeeed7e2da9bc3225827b1b4ed14bf4c2716762cc31220426780df54
|
|
| MD5 |
fa2d8877b0d0b0586b7834b349d4986a
|
|
| BLAKE2b-256 |
0405e0f925651597f8a3c1a8253353c1618f6e3b6097dbbf58dab4200e22ebca
|
File details
Details for the file texthooker_proxy-0.1.0-py3-none-any.whl.
File metadata
- Download URL: texthooker_proxy-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2cbe6fbc4628a09243bad1adee4e09959fbeade8f3ef22e78d68a51d996308e5
|
|
| MD5 |
61651dedd089924821fa0f76f16ded37
|
|
| BLAKE2b-256 |
7d533f61896877ba41d6340633ca08ba645e3b35b40fa598cdbeda65a2832585
|