{"id":21722729,"url":"https://github.com/ipitio/ocr-pdf","last_synced_at":"2025-04-12T21:51:59.932Z","repository":{"id":258353644,"uuid":"844802759","full_name":"ipitio/ocr-pdf","owner":"ipitio","description":"OCRmyPDF++  | and Merge it","archived":false,"fork":false,"pushed_at":"2024-10-21T20:04:23.000Z","size":4293,"stargazers_count":1,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-10-22T00:14:01.988Z","etag":null,"topics":["automation","docker","etl","img","ocr","pdf","tesseract"],"latest_commit_sha":null,"homepage":"https://ipitio.github.io/ocr-pdf/","language":"Jupyter Notebook","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/ipitio.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}},"created_at":"2024-08-20T02:06:41.000Z","updated_at":"2024-10-21T20:04:26.000Z","dependencies_parsed_at":"2024-10-26T02:57:33.124Z","dependency_job_id":"26cbea62-ee35-4fbc-8c88-504040946020","html_url":"https://github.com/ipitio/ocr-pdf","commit_stats":null,"previous_names":["ipitio/ocr-pdf"],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipitio%2Focr-pdf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipitio%2Focr-pdf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipitio%2Focr-pdf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipitio%2Focr-pdf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ipitio","download_url":"https://codeload.github.com/ipitio/ocr-pdf/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248637833,"owners_count":21137538,"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":["automation","docker","etl","img","ocr","pdf","tesseract"],"created_at":"2024-11-26T02:32:22.745Z","updated_at":"2025-04-12T21:51:59.909Z","avatar_url":"https://github.com/ipitio.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n[![logo](public/wide.webp)](https://github.com/ipitio/ocr-pdf)\n\n# ocr2pdf\n\n**Merge images into actual PDFs with AI**\n\n---\n\n[![build](https://github.com/ipitio/ocr-pdf/actions/workflows/publish.yml/badge.svg)](https://github.com/ipitio/ocr-pdf/actions/workflows/publish.yml) [![downloads](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fipitio.github.io%2Fbackage%2Fipitio%2Focr-pdf%2Focr-pdf.json\u0026query=%24.downloads\u0026logo=github\u0026logoColor=959da5\u0026labelColor=333a41\u0026label=pulls)](https://github.com/ipitio/ocr-pdf/pkgs/container/ocr-pdf) [![size](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fipitio.github.io%2Fbackage%2Fipitio%2Focr-pdf%2Focr-pdf.json\u0026query=%24.size\u0026logo=github\u0026logoColor=959da5\u0026label=size\u0026labelColor=333a41\u0026color=indigo)](https://github.com/ipitio/backage/pkgs/container/backage) [![latest](https://img.shields.io/badge/dynamic/xml?url=https%3A%2F%2Fipitio.github.io%2Fbackage%2Fipitio%2Focr-pdf%2Focr-pdf.xml\u0026query=%2Fbkg%2Fversion%5B.%2Flatest%5B.%3D%22true%22%5D%5D%2Ftags%5B.!%3D%22latest%22%5D\u0026logo=github\u0026logoColor=959da5\u0026label=latest\u0026labelColor=333a41\u0026color=darkgreen)](https://github.com/ipitio/backage/pkgs/container/backage)\n\n\u003c/div\u003e\n\nMerge images and scans into searchable and selectable PDFs! The core logic resides in a Python script that transforms the files with Tesseract via [OCRmyPDF](https://github.com/ocrmypdf/OCRmyPDF). For information about available options, see the [OCRmyPDF documentation](https://ocrmypdf.readthedocs.io/en/latest).\n\nA Bash script is provided to automate the installation of dependencies and the execution of the Python script. The Docker image provides a self-contained virtual environment that runs the Bash script in a container. The Google Colab notebook and GitHub Actions workflow both run the container in the cloud.\n\n\u003e [!NOTE]\n\u003e Files in subfolders will be merged in alphabetical order, but will still be available individually.\n\n## Fast Start\n\nGet up and going in no time with these options:\n\n### Cloud: Google Colab Notebook\n\nAre you on mobile or simply want an easy and seamless experience?\n\n1. Open [Colab](https://colab.research.google.com/github/ipitio/ocr-pdf/blob/master/colab.ipynb) in [Chrome](https://stackoverflow.com/a/48777857)\n2. Run the cell and follow the prompts\n3. Find the PDFs in your [Drive](https://drive.google.com/drive/my-drive)`/ocr-pdf`\n\nTo add OCRmyPDF options, append them to the `run` command.\n\n### Self-hosted\n\nDo you want to run it on your own machine, but don't want to clone the repo?\n\n1. Ensure you have Docker, or Bash and cURL, installed\n2. Make two new nested folders and put your files in them: `pdf/todo/*`\n3. Run one of the following from the outer `pdf` folder:\n\n#### Docker Container\n\nIf you want to skip building an image, just use mine:\n\n```bash\ndocker run --rm -v .:/app/pdf ghcr.io/ipitio/ocr-pdf \\\nbash predict.sh pdf [OCRmyPDF options]\n```\n\n#### Bash Script\n\nDon't want to install Docker? No problem!\n\n```bash\ncurl -sSLNZ https://ipitio.github.io/ocr-pdf/src/predict.sh |\\\nbash -s -- . [OCRmyPDF options]\n```\n\n## Quick Start\n\nIt's still as easy as 1, 2, 3!\n\n1. Fork and clone this repo\n2. Put your files in `pdf/todo/`\n3. Complete one of the following from the root of the repo:\n\n### Cloud: GitHub Actions Workflow\n\nEnable Actions on GitHub, then push your files:\n\n```bash\ngit add .\ngit commit -m \"add files\"\ngit push\n# wait for the magic to happen\ngit pull\n```\n\nTo add OCRmyPDF options, edit the command in the `predict.yml` file before committing.\n\n### Self-hosted\n\n#### Docker Container\n\nTo avoid polluting your system, use Docker Compose (which is included with Docker Desktop):\n\n```bash\ndocker compose up\n```\n\nTo add OCRmyPDF options, edit the command in the `compose.yml` file.\n\n#### Bash Script\n\nDo you want to make the most out of your hardware?\n\n```bash\nbash src/predict.sh pdf [OCRmyPDF options]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fipitio%2Focr-pdf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fipitio%2Focr-pdf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fipitio%2Focr-pdf/lists"}