{"id":18997672,"url":"https://github.com/maschmann/ocr-my-files","last_synced_at":"2026-06-30T10:31:47.036Z","repository":{"id":149752855,"uuid":"570981410","full_name":"maschmann/ocr-my-files","owner":"maschmann","description":"Automatically OCR PDF files ","archived":false,"fork":false,"pushed_at":"2023-01-12T22:00:06.000Z","size":24,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-21T12:36:27.135Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","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/maschmann.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":"2022-11-26T19:05:06.000Z","updated_at":"2023-01-10T20:22:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"96c1146d-77d4-4e6e-9202-99923f19484a","html_url":"https://github.com/maschmann/ocr-my-files","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/maschmann/ocr-my-files","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maschmann%2Focr-my-files","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maschmann%2Focr-my-files/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maschmann%2Focr-my-files/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maschmann%2Focr-my-files/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maschmann","download_url":"https://codeload.github.com/maschmann/ocr-my-files/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maschmann%2Focr-my-files/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34963633,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-30T02:00:05.919Z","response_time":92,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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-11-08T17:42:09.157Z","updated_at":"2026-06-30T10:31:47.021Z","avatar_url":"https://github.com/maschmann.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OCR my files\n\nThis docker setup uses OcrMyPdf (tesseract) to automatically OCR pdf files and add a textlayer.\nGenerally the process looks like this:\n\nYou can find it on [docker hub](https://hub.docker.com/r/maschmann/ocr-my-files)\n\n```bash\n|-- /incoming # houses new pdf files\n|-- /processed # will have files, OCR'ed and moved from incoming\n|-- /done # renamed files from processed\n|-- /raw # backupped (unchanged) files from incoming\n|-- /config # configuration files like custom_cron or rename_config\n```\n\n## Configuration\n\nCurrently the only configuration you can add, is a folder mount.\nUse following docker command to start with all configured folders.\n\n### docker native\n\n```bash\n$docker pull maschmann/ocr-my-files\n$docker run -d \\\n  -it \\\n  --name ocr-my-files \\\n  --mount type=bind,source=/etc/timezone, target=/etc/timezone \\\n  --mount type=bind,source=/etc/localtime, target=/etc/timezone \\\n  --mount type=bind,source=\"$(pwd)\"/incoming,target=/incoming \\\n  --mount type=bind,source=\"$(pwd)\"/processed,target=/processed \\\n  --mount type=bind,source=\"$(pwd)\"/done,target=/done \\\n  --mount type=bind,source=\"$(pwd)\"/raw,target=/raw \\\n  --mount type=bind,source=\"$(pwd)\"/config,target=/config \\\n  maschmann/ocr-my-files\n```\n\n### docker compose\n\n```bash\n# docker-compose.yml\nservices:\n  ocr-my-files:\n    image: maschmann/ocr-my-files\n    container_name: ocr-my-files\n    volumes:\n      - \"/etc/timezone:/etc/timezone:ro\"\n      - \"/etc/localtime:/etc/localtime:ro\"\n      - \"${LOCAL_BASE_PATH}/incoming:/incoming\"\n      - \"${LOCAL_BASE_PATH}/processed:/processed\"\n      - \"${LOCAL_BASE_PATH}/done:/done\"\n      - \"${LOCAL_BASE_PATH}/raw:/raw\"\n      - \"${LOCAL_BASE_PATH}/ocr-my-files:/config\"\n    restart: unless-stopped\n```\n\n### override-configs\n\nPut a ```rename_config``` file in your config directory, to override the defaults, specified like this:\n\n```bash\n# rename_config_default\n# specific types\n# has to be an indexed array to keep order, instead of a hashmap \n# this allows you to have a \"fallthrough\" kind of logic:\n# So, highly specific checks on top of less specific checks will first match \n# \"sozialversicherung\" and later on \"versicherung\" if no previous term matched\n\ntypes=(\n    \"lohnart==gehalt\"\n    \"meldebescheinigung==sozialversicherung\"\n    \"sozialversicherung==sozialversicherung\"\n    \"abfallgeb==abfallgebühren\"\n    \"grundsteuer==grundsteuer\"\n    \"wasser==wasser\"\n    \"hauptuntersuchung==hauptuntersuchung\"\n    \"lohnsteuerbescheinigung==lohnsteuer\"\n    \"bausparvertrag==kontoauszug-bausparvertrag\"\n    \"vorfinanzierungskredit==kontoauszug-vorfinanzierungskredit\"\n    \"jahreskontoauszug==kontoauszug\"\n    \"schornsteinfeger==kaminfeger\"\n    \"kontoauszug==kontoauszug\"\n    \"xxxxxxxxxxx==krankenkasse\"\n    \"haftpflicht\\-versicherung==haftpflichtversicherung\"\n    \"hausratversicherung==hausratversicherung\"\n    \"r\\+v\\-privatpolice==gebäudeversicherung\"\n    \"rechtsschutzversicherung==rechtsschutzversicherung\"\n    \"renteninformation==renteninformation\"\n    \"apcoa==parken\"\n    \"kraftfahrtversicherung==kfz-versicherung\"\n    \"rechnung==rechnung\"\n    \"lieferschein==rechnung\"\n    \"versicherung==versicherung\"\n    \"zeugnis==zeugnis\"\n    \"gehalt==gehalt\"\n)\n\nmonths[\"Januar\"]=\"01\"\nmonths[\"Februar\"]=\"02\"\nmonths[\"März\"]=\"03\"\nmonths[\"April\"]=\"04\"\nmonths[\"Mai\"]=\"05\"\nmonths[\"Juni\"]=\"06\"\nmonths[\"Juli\"]=\"07\"\nmonths[\"August\"]=\"08\"\nmonths[\"September\"]=\"09\"\nmonths[\"Oktober\"]=\"10\"\nmonths[\"November\"]=\"11\"\nmonths[\"Dezember\"]=\"12\"\n```\nAnd make sure to add both definitions, since there is no selective overwriting.\n\n## cron intervals\n\nThe default cron configuration is\n\n```bash\n*/5 * * * * root /ocr/ocr-my-files -i /incoming -o /processed -b /raw  \u003e /proc/1/fd/1 2\u003e/proc/1/fd/2\n# enable with custom cron overwrite\n#* * * * * root /ocr/rename-pdf -i /processed -o /done -k \u003e /proc/1/fd/1 2\u003e/proc/1/fd/2\n# empty line - needed\n```\n\nIt's checking for new files to convert every five minutes. It won't run double (semaphore logic) but you can provoke race conditions with a lot of large file, so I suggest not to go below 15 minute intervals. \nIt is possible to override the cron file with a custom one by supplying a ```custom_cron``` file in your config mount.\n\n## custom cron file\n\nYou can now also replace the default cron with a custom one, which will be copied to the internal cron.d automatically.\n\nUse the same format as seen above and feel free to play with the settings.\n\nJust put a ```custom_cron``` file into your config directory (see mounts above).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaschmann%2Focr-my-files","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaschmann%2Focr-my-files","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaschmann%2Focr-my-files/lists"}