{"id":18103121,"url":"https://github.com/dannnylo/rtesseract","last_synced_at":"2025-05-14T20:07:30.665Z","repository":{"id":1032849,"uuid":"861214","full_name":"dannnylo/rtesseract","owner":"dannnylo","description":"Ruby library for working with the Tesseract OCR.","archived":false,"fork":false,"pushed_at":"2023-10-06T00:46:40.000Z","size":1426,"stargazers_count":852,"open_issues_count":4,"forks_count":86,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-13T14:06:59.475Z","etag":null,"topics":["hacktoberfest","rtesseract","ruby","tesseract","tesseract-ocr"],"latest_commit_sha":null,"homepage":"http://rubygems.org/gems/rtesseract","language":"Ruby","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/dannnylo.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null},"funding":{"github":"dannnylo"}},"created_at":"2010-08-25T10:48:48.000Z","updated_at":"2025-04-08T15:33:43.000Z","dependencies_parsed_at":"2023-10-04T07:19:25.333Z","dependency_job_id":"5f8c6eed-de38-4795-9379-7492f9a109dc","html_url":"https://github.com/dannnylo/rtesseract","commit_stats":{"total_commits":251,"total_committers":27,"mean_commits":9.296296296296296,"dds":0.5896414342629481,"last_synced_commit":"c670b82ec454f2ea9f867f38113e87eec557e4ef"},"previous_names":[],"tags_count":35,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dannnylo%2Frtesseract","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dannnylo%2Frtesseract/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dannnylo%2Frtesseract/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dannnylo%2Frtesseract/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dannnylo","download_url":"https://codeload.github.com/dannnylo/rtesseract/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248724639,"owners_count":21151561,"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":["hacktoberfest","rtesseract","ruby","tesseract","tesseract-ocr"],"created_at":"2024-10-31T22:10:23.320Z","updated_at":"2025-04-13T14:07:04.513Z","avatar_url":"https://github.com/dannnylo.png","language":"Ruby","funding_links":["https://github.com/sponsors/dannnylo"],"categories":["Software"],"sub_categories":["OCR libraries by programming language"],"readme":"# RTesseract\n\n\u003ca href='http://badge.fury.io/rb/rtesseract'\u003e\n    \u003cimg src=\"https://badge.fury.io/rb/rtesseract.png\" alt=\"Gem Version\" /\u003e\n\u003c/a\u003e\n\u003ca href='https://github.com/dannnylo/rtesseract/workflows/CI/badge.svg'\u003e\n  \u003cimg src=\"https://github.com/dannnylo/rtesseract/workflows/CI/badge.svg\" alt=\"Build Status\" /\u003e\n\u003c/a\u003e\n\u003ca href='https://app.codacy.com/project/badge/Grade/316a48934db8415d84d2f9a318b0f837'\u003e\n  \u003cimg src=\"https://app.codacy.com/project/badge/Grade/316a48934db8415d84d2f9a318b0f837\" alt=\"Coverage Status\" /\u003e\n\u003c/a\u003e\n\u003ca href='https://app.codacy.com/project/badge/Coverage/316a48934db8415d84d2f9a318b0f837'\u003e\n  \u003cimg src=\"https://app.codacy.com/project/badge/Coverage/316a48934db8415d84d2f9a318b0f837\" alt=\"Coverage\" /\u003e\n\u003c/a\u003e\n\u003ca href='https://codeclimate.com/github/dannnylo/rtesseract'\u003e\n    \u003cimg src=\"https://codeclimate.com/github/dannnylo/rtesseract.png\" /\u003e\n\u003c/a\u003e\n\nRuby library for working with the Tesseract OCR.\n\n## Installation\n\nCheck if tesseract ocr programs are installed:\n\n    $ tesseract --version\n\nIf not, you can install them with a command like:\n\n    $ apt install tesseract-ocr\n\nor\n\n    $ brew install tesseract\n\nor for Heroku 22 to add the buildpack https://github.com/pathwaysmedical/heroku-buildpack-tesseract\n\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'rtesseract'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install rtesseract\n\n## Usage\n\nIt's very simple to use rtesseract.\n\n### Convert image to string\n\n```ruby\n  image = RTesseract.new(\"my_image.jpg\")\n  image.to_s # Getting the value\n```\n\n### Convert image to searchable PDF\n\n```ruby\n  image = RTesseract.new(\"my_image.jpg\")\n  image.to_pdf  # Getting open file of pdf\n```\n\n### Convert image to TSV\n\n```ruby\n  image = RTesseract.new(\"my_image.jpg\")\n  image.to_tsv  # Getting open file of tsv\n```\n\nThis will preserve the image colors, pictures and structure in the generated pdf.\n\n## Options\n\n### Language\n\n  ```ruby\n      RTesseract.new('test.jpg', lang: 'deu')\n  ```\n\n  * eng   - English\n  * deu   - German\n  * deu-f - German fraktur\n  * fra   - French\n  * ita   - Italian\n  * nld   - Dutch\n  * por   - Portuguese\n  * spa   - Spanish\n  * vie   - Vietnamese\n  * or any other supported by tesseract.\n\n  Note: Make sure you have installed the language to tesseract\n\n### Other options\n\n  ```ruby\n    RTesseract.new('test.jpg', config_file: :digits)  # Only digit recognition\n  ```\n\n  OR\n\n  ```ruby\n    RTesseract.new('test.jpg', config_file: 'digits quiet')\n  ```\n\n### BOUNDING BOX: TO GET WORDS WITH THEIR POSITIONS\n\n  ```ruby\n    RTesseract.new('test_words.png').to_box\n    =\u003e [\n      { :word =\u003e 'If', :confidence=\u003e89, :x_start=\u003e52, :y_start=\u003e13, :x_end=\u003e63, :y_end=\u003e27},\n      { :word =\u003e 'you', :confidence=\u003e96, :x_start=\u003e69, :y_start=\u003e17, :x_end=\u003e100, :y_end=\u003e31},\n      { :word =\u003e 'are', :confidence=\u003e92, :x_start=\u003e108, :y_start=\u003e17, :x_end=\u003e136, :y_end=\u003e27},\n      { :word =\u003e 'a', :confidence=\u003e92, :x_start=\u003e133, :y_start=\u003e8, :x_end=\u003e147, :y_end=\u003e35},\n      { :word =\u003e 'friend,', :confidence=\u003e95, :x_start=\u003e158, :y_start=\u003e13, :x_end=\u003e214, :y_end=\u003e29},\n      { :word =\u003e 'you', :confidence=\u003e96, :x_start=\u003e51, :y_start=\u003e39, :x_end=\u003e82, :y_end=\u003e53},\n      { :word =\u003e 'speak', :confidence=\u003e96, :x_start=\u003e90, :y_start=\u003e35, :x_end=\u003e140, :y_end=\u003e53},\n      { :word =\u003e 'the', :confidence=\u003e96, :x_start=\u003e146, :y_start=\u003e35, :x_end=\u003e174, :y_end=\u003e49},\n      { :word =\u003e 'password,', :confidence=\u003e96, :x_start=\u003e182, :y_start=\u003e35, :x_end=\u003e267, :y_end=\u003e53},\n      { :word =\u003e 'and', :confidence=\u003e96, :x_start=\u003e51, :y_start=\u003e57, :x_end=\u003e81, :y_end=\u003e71},\n      { :word =\u003e 'the', :confidence=\u003e96, :x_start=\u003e89, :y_start=\u003e57, :x_end=\u003e117, :y_end=\u003e71},\n      { :word =\u003e 'doors', :confidence=\u003e96, :x_start=\u003e124, :y_start=\u003e57, :x_end=\u003e172, :y_end=\u003e71},\n      { :word =\u003e 'will', :confidence=\u003e96, :x_start=\u003e180, :y_start=\u003e57, :x_end=\u003e208, :y_end=\u003e71},\n      { :word =\u003e 'open.', :confidence=\u003e96, :x_start=\u003e216, :y_start=\u003e61, :x_end=\u003e263, :y_end=\u003e75}\n    ]\n  ```\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/dannnylo/rtesseract. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n\n## Code of Conduct\n\nEveryone interacting in the Rtesseract project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/dannnylo/rtesseract/blob/master/CODE_OF_CONDUCT.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdannnylo%2Frtesseract","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdannnylo%2Frtesseract","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdannnylo%2Frtesseract/lists"}