{"id":37079197,"url":"https://github.com/alisafaya/txt-from-pdf","last_synced_at":"2026-01-14T09:35:15.619Z","repository":{"id":234212181,"uuid":"788441334","full_name":"alisafaya/txt-from-pdf","owner":"alisafaya","description":"Extracting clean text from pdfs using pdfminer.six and pypdf.","archived":false,"fork":false,"pushed_at":"2024-07-27T16:28:44.000Z","size":54,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-20T13:29:12.553Z","etag":null,"topics":["pdf","pdf-document-processor","text-mining"],"latest_commit_sha":null,"homepage":"","language":"Python","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/alisafaya.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-04-18T12:26:52.000Z","updated_at":"2024-07-27T16:28:47.000Z","dependencies_parsed_at":"2024-04-24T12:54:02.698Z","dependency_job_id":null,"html_url":"https://github.com/alisafaya/txt-from-pdf","commit_stats":null,"previous_names":["alisafaya/txt-from-pdf"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/alisafaya/txt-from-pdf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alisafaya%2Ftxt-from-pdf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alisafaya%2Ftxt-from-pdf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alisafaya%2Ftxt-from-pdf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alisafaya%2Ftxt-from-pdf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alisafaya","download_url":"https://codeload.github.com/alisafaya/txt-from-pdf/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alisafaya%2Ftxt-from-pdf/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28416120,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T08:38:59.149Z","status":"ssl_error","status_checked_at":"2026-01-14T08:38:43.588Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["pdf","pdf-document-processor","text-mining"],"created_at":"2026-01-14T09:35:14.978Z","updated_at":"2026-01-14T09:35:15.613Z","avatar_url":"https://github.com/alisafaya.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# txt-from-pdf: Extract clean text from PDFs\n\n[![Github release](https://img.shields.io/github/release/alisafaya/txt-from-pdf.svg)](https://github.com/alisafaya/txt-from-pdf/releases)\n[![PyPI version](https://badge.fury.io/py/txt-from-pdf.svg)](https://badge.fury.io/py/txt-from-pdf)\n[![GitHub license](https://img.shields.io/github/license/alisafaya/txt-from-pdf.svg)](./LICENSE)\n\nExtracting text from pdfs using [pymupdf](https://github.com/pymupdf/PyMuPDF/), but with a focus on cleaning and formatting the extracted text. \n\n# Installation\n\n```bash\npip install txt-from-pdf\n```\n\n# Usage\n\n```python\nfrom txtfrompdf import extract_txt_from_pdf\n\npdf_path = \"file.pdf\"\ntext = extract_txt_from_pdf(pdf_path)\nprint(text)\n```\n\n# CLI Usage\n\nSingle file:\n\n```bash\ntxt-from-pdf --input file.pdf --output extracted-text \n```\n\nMultiple files in a directory:\n\n```bash\ntxt-from-pdf --input dir-with-pdfs --output extracted-text \n```\n\nDetailed help:\n\n```bash\nusage: txt-from-pdf [-h] --input INPUT [--output OUTPUT] [--no_filter] [--size SIZE]\n\ntxt-from-pdf CLI - Extracts cleaned text from PDF files\n\noptions:\n  -h, --help       show this help message and exit\n  --input INPUT    Path to a folder containing PDFs or to a single PDF file. (Required)\n  --output OUTPUT  Output location for the extracted text files. (Optional, default: 'extracted_text')\n  --no_filter      Turn off cleaning the resulting text files. (Optional)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falisafaya%2Ftxt-from-pdf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falisafaya%2Ftxt-from-pdf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falisafaya%2Ftxt-from-pdf/lists"}