{"id":21098768,"url":"https://github.com/tinyadapter/node-textractor","last_synced_at":"2025-05-16T16:32:45.561Z","repository":{"id":34074019,"uuid":"168655437","full_name":"tinyAdapter/node-textractor","owner":"tinyAdapter","description":"Textractor wrapper for Node.js. Extracts text from video games and visual novels.","archived":false,"fork":false,"pushed_at":"2023-09-27T20:45:59.000Z","size":28,"stargazers_count":6,"open_issues_count":4,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-16T05:49:09.438Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/textractor-wrapper","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tinyAdapter.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-02-01T06:52:54.000Z","updated_at":"2024-04-27T00:07:50.000Z","dependencies_parsed_at":"2022-08-08T00:00:35.842Z","dependency_job_id":null,"html_url":"https://github.com/tinyAdapter/node-textractor","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinyAdapter%2Fnode-textractor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinyAdapter%2Fnode-textractor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinyAdapter%2Fnode-textractor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinyAdapter%2Fnode-textractor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tinyAdapter","download_url":"https://codeload.github.com/tinyAdapter/node-textractor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225439242,"owners_count":17474487,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-19T22:56:26.775Z","updated_at":"2024-11-19T22:56:27.214Z","avatar_url":"https://github.com/tinyAdapter.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# node-textractor\n\nTextractor wrapper for Node.js.\n\n[Textractor](https://github.com/Artikash/Textractor) (a.k.a. NextHooker) is an open-source x86/x64 text hooker for Windows/Wine based off of ITHVNR.\n\n## Requirements\n\n- Textractor v4.3.0 and above\n\n## Example\n\n```js\nconst Textractor = require(\"textractor\").Textractor;\n\nlet t = new Textractor(\"X:/path/to/TextractorCLI.exe\");\n\nt.on(\"output\", output =\u003e {\n  console.log(`[${output.handle}]: ${output.text}`);\n});\nt.start();\nt.attach(PID);\n```\n\n## API\n\n### Textractor(path: string)\n\nThe constructor.\n\n#### Params\n\n- `path` - Path to TextractorCLI.exe\n\n### start(): void\n\nStart Textractor process.\n\n### attach(pid: number): void\n\nAttach text hooker to a specific process.\n\n#### Params\n\n- `pid` - Process ID\n\n#### Throws\n\n- _RangeError_ if pid is invalid\n- _ReferenceError_ if Textractor process is not started\n\n### detach(pid: number): void\n\nDetach text hooker to a specific process.\n\n#### Params\n\n- `pid` - Process ID\n\n#### Throws\n\n- _ReferenceError_ if the process has not been attached\n\n### hook(pid: number, code: string): void\n\nInject a hook into a specific process.\n\nSupports **/H** hook code and **/R** read code.\n\n#### Params\n\n- `pid` - Process ID\n\n#### Throws\n\n- _ReferenceError_ if Textractor process is not started\n- _ReferenceError_ if the process has not been attached\n- _SyntaxError_ if code is invalid\n\n### on(event: \"output\", listener: (output: TextOutputObject) =\u003e void): this\n\nSpecify callback function when text outputs.\n\n#### Params\n\n- `event` - Must be \"output\"\n- `listener` - The callback function\n\n#### TextOutputObject\n\n```ts\n{\n  handle: number; // hook index\n  pid: number; // process ID\n  addr: number; // hook address\n  ctx: number; // hook context\n  ctx2: number; // hook context 2\n  name: string; // hook name\n  code: string; // hook code\n  text: string; // output text\n}\n```\n\n### exec(command: string): void\n\nExecute a command manually.\n\n#### Params\n\n- `command` - The command to execute\n\n#### Throws\n\n- _ReferenceError_ if Textractor process is not started\n\n### stop(): void\n\nStop Textractor process.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftinyadapter%2Fnode-textractor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftinyadapter%2Fnode-textractor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftinyadapter%2Fnode-textractor/lists"}