{"id":27264204,"url":"https://github.com/xcrap-cloud/image-text-extractor","last_synced_at":"2025-04-11T06:51:28.992Z","repository":{"id":287232235,"uuid":"964056720","full_name":"Xcrap-Cloud/image-text-extractor","owner":"Xcrap-Cloud","description":"Xcrap Image Text Extractor is a package of the Xcrap framework that abstracts the extraction of texts from images using the node-tesseract-ocr library.","archived":false,"fork":false,"pushed_at":"2025-04-10T16:38:48.000Z","size":85,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-10T18:00:16.316Z","etag":null,"topics":["extractor","image","javascript","nodejs","scraping","tesseract","text","typescript","web","xcrap"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@xcrap/image-text-extractor","language":"TypeScript","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/Xcrap-Cloud.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-10T16:11:27.000Z","updated_at":"2025-04-10T16:41:16.000Z","dependencies_parsed_at":"2025-04-10T18:00:25.834Z","dependency_job_id":"383dee86-f7b5-456e-a57b-0475fff03e60","html_url":"https://github.com/Xcrap-Cloud/image-text-extractor","commit_stats":null,"previous_names":["xcrap-cloud/image-text-extractor"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xcrap-Cloud%2Fimage-text-extractor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xcrap-Cloud%2Fimage-text-extractor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xcrap-Cloud%2Fimage-text-extractor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xcrap-Cloud%2Fimage-text-extractor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Xcrap-Cloud","download_url":"https://codeload.github.com/Xcrap-Cloud/image-text-extractor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248358548,"owners_count":21090401,"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":["extractor","image","javascript","nodejs","scraping","tesseract","text","typescript","web","xcrap"],"created_at":"2025-04-11T06:51:28.136Z","updated_at":"2025-04-11T06:51:28.981Z","avatar_url":"https://github.com/Xcrap-Cloud.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🕷️ Xcrap Image Text Extractor\n\n**Xcrap Image Text Extractor** is a package of the Xcrap framework that abstracts the extraction of texts from images using the [node-tesseract-ocr](https://www.npmjs.com/package/node-tesseract-ocr) library.\n\n## 📦 Installation\n\nThere are no secrets to installing it, just use your preferred dependency manager. Here is an example using NPM:\n\n```cmd\nnpm i @xcrap/image-text-extractor\n```\n\n## 🚀 Usage\n\n**Xcrap Image Text Extractor** provides an *async extractor* that can be used in an HTML parsing model just like any extractor:\n\n```ts\nimport { extractImageText } from \"@xcrap/image-text-extractor\"\nimport { HtmlParsingModel } from \"@xcrap/parser\"\n\nconst parsingModel = new ParsingModel({\n\timageTexts: {\n\t\tquery: \"img\",\n\t\tmultiple: true,\n\t\textractor: extractImageText({ lang: \"eng\" })\n\t}\n})\n```\n\nIf you want to transform the `src` of the images to resolve relative paths or something like that, pass the `transformSrc` option in the options like this:\n\n```ts\nconst parsingModel = new ParsingModel({ \n    imageTexts: {\n        query: \"img\",\n        multiple: true,\n        extractor: extractImageText({\n            lang: \"eng\",\n            transformSrc: (originalSrc) =\u003e {...}\n        })\n    }\n})\n```\n\n\u003e Check out more options at [node-tesseract-ocr](https://www.npmjs.com/package/node-tesseract-ocr).\n\n## 🤝 Contributing\n\n- Want to contribute? Follow these steps:\n- Fork the repository.\n- Create a new branch (git checkout -b feature-new).\n- Commit your changes (git commit -m 'Add new feature').\n- Push to the branch (git push origin feature-new).\n- Open a Pull Request.\n\n## 📝 License\n\nThis project is licensed under the MIT License.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxcrap-cloud%2Fimage-text-extractor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxcrap-cloud%2Fimage-text-extractor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxcrap-cloud%2Fimage-text-extractor/lists"}