{"id":28481738,"url":"https://github.com/elchemista/doc_dig","last_synced_at":"2025-08-04T15:38:38.476Z","repository":{"id":292691194,"uuid":"981634512","full_name":"elchemista/doc_dig","owner":"elchemista","description":"DocDig is an Elixir wrapper around the Rust-based extractous library, exposing high-performance document and web-page text extraction via Rustler NIFs.","archived":false,"fork":false,"pushed_at":"2025-05-12T11:31:01.000Z","size":122,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-05T00:37:28.127Z","etag":null,"topics":["elixir","parsing","pdf","rag","rust"],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elchemista.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-05-11T14:58:05.000Z","updated_at":"2025-05-12T15:02:34.000Z","dependencies_parsed_at":"2025-05-11T21:46:12.025Z","dependency_job_id":null,"html_url":"https://github.com/elchemista/doc_dig","commit_stats":null,"previous_names":["elchemista/doc_dig"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/elchemista/doc_dig","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elchemista%2Fdoc_dig","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elchemista%2Fdoc_dig/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elchemista%2Fdoc_dig/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elchemista%2Fdoc_dig/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elchemista","download_url":"https://codeload.github.com/elchemista/doc_dig/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elchemista%2Fdoc_dig/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268716545,"owners_count":24295516,"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","status":"online","status_checked_at":"2025-08-04T02:00:09.867Z","response_time":79,"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":["elixir","parsing","pdf","rag","rust"],"created_at":"2025-06-07T20:08:31.014Z","updated_at":"2025-08-04T15:38:38.465Z","avatar_url":"https://github.com/elchemista.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DocDig\n\n**DocDig** is an Elixir wrapper around the Rust-based [`extractous`](https://github.com/yobix-ai/extractous) library, exposing high-performance document and web-page text extraction via Rustler NIFs.\n\n## Features\n\n* Extract text from **local files**: PDF, DOCX, HTML, Markdown, etc.\n* Fetch and extract from **URLs**.\n* Extract from in-memory **binaries**.\n* Perform **OCR** on image-only PDFs or images via Tesseract (customizable language).\n* Optional **bang (`!`)** variants that raise on errors for concise workflows.\n* Precompiled NIFs with [`rustler_precompiled`](https://github.com/philss/rustler_precompiled) support for zero‑toolchain installs.\n\n## Installation\n\nAdd to your `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:doc_dig, github: \"elchemista/doc_dig\", branch: \"master\"}\n  ]\nend\n```\n\nThen fetch and compile:\n\n```bash\nmix deps.get\nmix compile\n```\n\n## Usage Examples\n\n```elixir\n# Extract from a local Markdown file:\n{:ok, {text, metadata}} = DocDig.extract_file(\"README.md\")\nIO.puts(text)\nIO.inspect(metadata)\n\n# Raise on failure:\n{text, _meta} = DocDig.extract_file!(\"README.md\")\n\n# Extract from a URL:\n{:ok, {html_text, _}} = DocDig.extract_url(\"https://example.com\")\n\n# Extract from in-memory binary (e.g. download via HTTPoison):\n{:ok, file_bytes} = HTTPoison.get(\"https://example.com/sample.docx\")\n{:ok, {doc_text, _}} = DocDig.extract_bytes(file_bytes)\n\n# Force OCR on a scanned PDF (German language):\n{:ok, {ocr_text, _}} = DocDig.extract_file_ocr(\"invoice_scanned.pdf\", \"deu\")\n```\n\n## Contributing\n\n1. Fork the repo\n2. Create a feature branch: `git checkout -b feature/my-addition`\n3. Run tests: `mix test`\n4. Submit a pull request\n\n## Credits\n\n* **extractous** by Yobix AI and contributors\n* **Rustler** by the Rustler team\n* **Tesseract OCR** for OCR support\n* **Elixir** and **Erlang/OTP** community\n\n## License\n\nApache-2.0 © [License](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felchemista%2Fdoc_dig","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felchemista%2Fdoc_dig","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felchemista%2Fdoc_dig/lists"}