{"id":13433027,"url":"https://github.com/desmondmorris/node-tesseract","last_synced_at":"2025-05-16T03:05:26.695Z","repository":{"id":3800134,"uuid":"4878991","full_name":"desmondmorris/node-tesseract","owner":"desmondmorris","description":"A simple wrapper for the Tesseract OCR package","archived":false,"fork":false,"pushed_at":"2020-08-21T08:16:53.000Z","size":43,"stargazers_count":675,"open_issues_count":38,"forks_count":117,"subscribers_count":26,"default_branch":"master","last_synced_at":"2025-05-05T21:39:18.904Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/desmondmorris.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":"2012-07-04T00:16:34.000Z","updated_at":"2024-11-18T17:51:16.000Z","dependencies_parsed_at":"2022-09-16T12:51:47.269Z","dependency_job_id":null,"html_url":"https://github.com/desmondmorris/node-tesseract","commit_stats":{"total_commits":56,"total_committers":14,"mean_commits":4.0,"dds":0.4821428571428571,"last_synced_commit":"30249786e35a2698dfae20c6534935d4f8d18420"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/desmondmorris%2Fnode-tesseract","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/desmondmorris%2Fnode-tesseract/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/desmondmorris%2Fnode-tesseract/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/desmondmorris%2Fnode-tesseract/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/desmondmorris","download_url":"https://codeload.github.com/desmondmorris/node-tesseract/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254459088,"owners_count":22074605,"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-07-31T02:01:19.988Z","updated_at":"2025-05-16T03:05:21.687Z","avatar_url":"https://github.com/desmondmorris.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# Tesseract for node.js\n\n[![NPM](https://nodei.co/npm/node-tesseract.png)](https://nodei.co/npm/node-tesseract/)\n\nA simple wrapper for the Tesseract OCR package for node.js\n\n## Requirements\n\n* Tesseract 3.01 or higher is needed for this to work\n\n## Installation\nThere is a hard dependency on the [Tesseract project](https://github.com/tesseract-ocr/tesseract).  You can find installation instructions for various platforms on the project site. For Homebrew users, the installation is quick and easy.\n\n    brew install tesseract --with-all-languages\n\nThe above will install all of the language packages available, if you don't need them all you can remove the `--all-languages` flag and install them manually, by downloading them to your local machine and then exposing the `TESSDATA_PREFIX` variable into your path:\n\n    export TESSDATA_PREFIX=~/Downloads/\n\nYou can then go about installing the node-module to expose the JavaScript API:\n\n    npm install node-tesseract\n\n## Usage\n\n```JavaScript\nvar tesseract = require('node-tesseract');\n\n// Recognize text of any language in any format\ntesseract.process(__dirname + '/path/to/image.jpg',function(err, text) {\n\tif(err) {\n\t\tconsole.error(err);\n\t} else {\n\t\tconsole.log(text);\n\t}\n});\n\n// Recognize German text in a single uniform block of text and set the binary path\n\nvar options = {\n\tl: 'deu',\n\tpsm: 6,\n\tbinary: '/usr/local/bin/tesseract'\n};\n\ntesseract.process(__dirname + '/path/to/image.jpg', options, function(err, text) {\n\tif(err) {\n\t\tconsole.error(err);\n\t} else {\n\t\tconsole.log(text);\n\t}\n});\n```\n\n## Changelog\n* **0.2.7**: Adds output file extension detection\n* **0.2.6**: Catches exception when deleting tmp files that do not exist\n* **0.2.5**: Preserves whitespace and replaces tmp module\n* **0.2.4**: Removes console logging for messaging\n* **0.2.3**: The ability to set the binary path via the config object.  Better installation documentation.\n* **0.2.2**: Adds test converage to utils module\n* **0.2.1**: Strips leading \u0026 trailing whitespace from output by default\n* **0.2.0**: Adds ability to pass options via a configuration object.\n* **0.1.1**: Updates tmp module.\n* **0.1.0**: Removes preprocessing functionatlity.  See #3.\n* **0.0.3**: Adds basic test coverage for process method\n* **0.0.2**: Pulls in changes by [joscha](https://github.com/joscha) including: refactored to support tesseract 3.01, added language parameter, config parameter, documentation, Added support for custom preprocessors, OTB Preprocessor using ImageMagick 'convert'\n* **0.0.1**: Initial version\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdesmondmorris%2Fnode-tesseract","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdesmondmorris%2Fnode-tesseract","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdesmondmorris%2Fnode-tesseract/lists"}