{"id":23092043,"url":"https://github.com/thiswillbeyourgithub/ocr_with_format","last_synced_at":"2026-02-14T12:03:08.500Z","repository":{"id":183729980,"uuid":"670651200","full_name":"thiswillbeyourgithub/OCR_with_format","owner":"thiswillbeyourgithub","description":"Wrapper around pytesseract to postprocess in a way that preserves spacing and formattings.","archived":false,"fork":false,"pushed_at":"2026-01-16T09:23:14.000Z","size":207,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-16T23:46:00.068Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thiswillbeyourgithub.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":"2023-07-25T14:22:31.000Z","updated_at":"2026-01-16T09:23:18.000Z","dependencies_parsed_at":"2024-12-16T21:27:09.709Z","dependency_job_id":"cf621c44-bf7c-48d1-91fd-c76d713fffb1","html_url":"https://github.com/thiswillbeyourgithub/OCR_with_format","commit_stats":null,"previous_names":["thiswillbeyourgithub/ocr_with_format"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/thiswillbeyourgithub/OCR_with_format","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thiswillbeyourgithub%2FOCR_with_format","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thiswillbeyourgithub%2FOCR_with_format/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thiswillbeyourgithub%2FOCR_with_format/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thiswillbeyourgithub%2FOCR_with_format/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thiswillbeyourgithub","download_url":"https://codeload.github.com/thiswillbeyourgithub/OCR_with_format/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thiswillbeyourgithub%2FOCR_with_format/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29443468,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-14T10:51:12.367Z","status":"ssl_error","status_checked_at":"2026-02-14T10:50:52.088Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-12-16T21:26:55.598Z","updated_at":"2026-02-14T12:03:08.472Z","avatar_url":"https://github.com/thiswillbeyourgithub.png","language":"Python","readme":"# OCR_with_format\n* simple wrapper that postprocesses pytesseract's hOCR output to maintain format and spacings.\n* [Link to an alternative implementation found on stackoverflow](https://stackoverflow.com/questions/59582008/preserving-indentation-with-tesseract-ocr-4-x)\n\n## How to\n* install `python -m pip install OCR_with_format`\n* see usage `OCR_with_format --help` (executing with `python -m` is not supported)\n\n## Usage\n```\nNAME\n    OCR_with_format\n\nSYNOPSIS\n    OCR_with_format IMG_PATH \u003cflags\u003e\n\nPOSITIONAL ARGUMENTS\n    IMG_PATH\n        Type: str\n        path to the image you want to do OCR on\n\nFLAGS\n    -m, --method=METHOD\n        Type: str\n        Default: 'with_format'\n        if 'with_format', will use the author's code if 'none', will output tesseract's default output if 'stackoverflow', will output using another algorithm found on stackoverflow\n    --thresholding_method=THRESHOLDING_METHOD\n        Type: str\n        Default: 'otsu'\n        any from \"otsu\", \"otsu_gaussian\", \"adaptative_gaussian\", \"all\"\n\n        If \"all\", the three methods will be tried and the final output will be the one which maximizes the mean and median confidences over each parsed words.\n    -l, --language=LANGUAGE\n        Type: str\n        Default: 'eng'\n        language to look for in the image\n    -o, --output_path=OUTPUT_PATH\n        Type: Optional[str]\n        Default: None\n        if not None, will output to this path and erase its previous content.\n    --tesseract_args=TESSERACT_ARGS\n        Type: str\n        Default: '-...\n        default arguments for tesseract\n    -q, --quiet=QUIET\n        Default: False\n        if True, will only print the output and no logs\n\nNOTES\n    You can also use flags syntax for POSITIONAL ARGUMENTS\n\n```\n\n## Example\n\n* Image:\n  * ![](https://github.com/thiswillbeyourgithub/OCR_with_format/blob/295e724b758045dc952934b6f0d98172fdc9a12e/screenshot.png?raw=true)\n* output from `OCR_with_format ./screenshot.png --thresholding_method=\"all\"  --quiet`\n```\n                                                                    @Unwateh (1) ~        Fork (3)                  (©\n    OCR_with_format                          [     Pir ][                   | [  \u0026            \u003c) [     s        -]\n                                                                                          About\n                                                                                                                              \u0026\n                                                                                          Wrapper around pytesseract to\n¥ Branches  © Tags                                                                     postprocess in a way that preserves\n                                                                                          spacing and formattings.\n  i  thiswillbeyourgithub addded license                        10 minutes ago  O 4\n                                                                                          \u00265 GPL-3.0 license\n  @  LICENSE            addded license                             10 minutes ago    - Activity\n  [u]  __init__.py           minor                                      11 minutes ago     ¢ Ostars\n  [u]  requirements.txt       added empty requirements                  11 minutes ago    \u003c\u0026 1 watching\n                                                                                          Y  Oforks\n  Help people interested in this repository understand your project by\n  adding a README.                                                                      Releases\n                                                                                          Create No releases a new published release\n                                                                                          Packages\n                                                                                          No packages published\n                                                                                          Publish your first package\n                                                                                          Languages\n                                                                                          ———\n                                                                                           ® Python 100.0%\n```\n* output from `OCR_with_format ./screenshot.png --quiet --comparison_run`\n  *\n```\nOCR_with_format\n\n[ pin | [ @unwateh (@) ~ | [ \u0026 Fork (O)\n\n-] [ ¢ s (0\n\n¥ main ~\n\n¥ Branches © Tags\n\nWrapper around pytesseract to\npostprocess in a way that preserves\n\n. . . spacing and formattings.\n- thiswillbeyourgithub addded license 10 minutes ago 'O 4\n\u00265 GPL-3.0 license\n@ LICENSE addded license 10 minutes ago A Activity\n0O _init__py minor 11 minutes ago ¢ Ostars\nO requirements.txt added empty requirements 11 minutes ago | @ 1watching\n% 0forks\nHelp people interested in this repository understand your project by\nadding a README. Releases\n\nNo releases published\nCreate a new release\n\nPackages\n\nNo packages published\nPublish your first package\n\nLanguages\n\n————\n@ Python 100.0%\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthiswillbeyourgithub%2Focr_with_format","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthiswillbeyourgithub%2Focr_with_format","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthiswillbeyourgithub%2Focr_with_format/lists"}