{"id":25290512,"url":"https://github.com/valaises/pdf-summ-coxit","last_synced_at":"2025-07-18T15:35:43.530Z","repository":{"id":277150647,"uuid":"929078109","full_name":"valaises/pdf-summ-coxit","owner":"valaises","description":"Advanced PDF Summarizer for specific COXIT documents using latest LLMs and semi-agentic workflows","archived":false,"fork":false,"pushed_at":"2025-02-17T12:59:25.000Z","size":193,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-27T02:43:27.890Z","etag":null,"topics":["llms","pdf","pdf-summarizer-ai","uv"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/valaises.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-02-07T19:08:49.000Z","updated_at":"2025-02-28T21:44:52.000Z","dependencies_parsed_at":"2025-05-27T02:38:16.822Z","dependency_job_id":null,"html_url":"https://github.com/valaises/pdf-summ-coxit","commit_stats":null,"previous_names":["valaises/pdf-summ-coxit"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/valaises/pdf-summ-coxit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valaises%2Fpdf-summ-coxit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valaises%2Fpdf-summ-coxit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valaises%2Fpdf-summ-coxit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valaises%2Fpdf-summ-coxit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/valaises","download_url":"https://codeload.github.com/valaises/pdf-summ-coxit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valaises%2Fpdf-summ-coxit/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265786738,"owners_count":23828324,"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":["llms","pdf","pdf-summarizer-ai","uv"],"created_at":"2025-02-13T00:26:39.106Z","updated_at":"2025-07-18T15:35:43.508Z","avatar_url":"https://github.com/valaises.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## PDF Summarizer for [COXIT](https://coxit.co/)\n\nA powerful tool for automated PDF document processing and summarization using LLM models. The tool processes PDF documents, extracts their content, and generates structured summaries using advanced language models.\n\nNote: Tool is specifically designed for [COXIT](https://coxit.co/) documents and won't be of use for generic PDF documents.\n\nNote: Paid GEMINI Plan is recommended as it has higher rate limits\n\n## Features\n\n- 📄 Automated PDF document processing\n- 🔍 Intelligent section detection and organization\n- 🤖 LLM-powered content summarization\n- 📊 Structured output in CSV format\n- 👀 Real-time document monitoring\n- 🚀 Multi-threaded \u0026 asynchronous processing pipeline\n\n## How It Works\n\n#### The tool operates in a pipeline:\n\n1. **Document Monitoring**: Watches the target directory for new PDF files\n2. **PDF Processing**: Extracts and processes text from PDF documents\n3. **Step 1**: Initial content analysis and section detection\n4. **Step 2**: Section-based summarization\n5. **Output Formatting**: Generates structured CSV output\n\n## On-Device Installation \u0026 Usage\n1. Install uv\n\n[about: uv - modern pip, pipx, poetry, venv replacement](https://docs.astral.sh/uv/getting-started/installation/)\n```bash\nwget -qO- https://astral.sh/uv/install.sh | sh\n```\n\n2. Clone the repository\n```bash\ngit clone https://github.com/valaises/pdf-summ-coxit.git\n```\n\n3. Install pdf-summ-coxit\n```bash\nuv sync \u0026\u0026 pip install -e .\n```\n4. Set ENV variables\n```bash\nexport GEMINI_API_KEY =\nexport OPENAI_API_KEY = \n```\n\n5. Run the summarizer\n```bash\npython -m src.core.main -d /path/to/your/pdfs\n```\n\n### Command Line Arguments\n\n- `-d` `--target-dir`: Directory to monitor for PDF files (required)\n- `--debug`: Enable debug logging (optional)\n\n## Docker Usage \n(assuming docker is installed)\n\n1. Build an image\n```bash\ncd ~/code/pdf-summ-coxit\n```\n```bash\ndocker buid -t pdf-summ .\n```\n2. Specify variables in .env\n```\ncp .env.example .env\n```\n```\nvim .env\n```\n3. Start container (detached mode)\n```bash\ndocker run -d --env-file .env -v /path/to/your/pdfs:/app/target_dir pdf-summ\n```\n\n## Docker Compose Usage\n(assuming docker \u0026 docker compose are installed)\n1. Set ENV variables in .env \u0026 .env.compose \n```bash\ncp .env.example .env\ncp .env.compose.example .env.compose\n```\n```bash\nvim .env\n```\n```bash\nvim .env.compose\n```\n2. Start container (detached mode)\n```bash\ndocker compose --env-file .env.compose up\n```\n\n## Getting results\n\nAfter each document is processed, `output.csv`, `output_parts.csv`, and `usage.csv` are automatically re-generated in `artifacts` inside a directory specified by the `-d` `--output_dir` argument.\n\n#### Notes about `usage`: \n* N-requests needed to summarize a document in most cases is: page_count + sections_count\n* Model is generally `gemini-2`, unless it fails to generate JSON, then it's `gpt-4o`\n* time needed to summarize all documents != sum(t for t in doc.usage), as documents are processed asynchronously\n* cost is calculated using data provided in `assets/model_list.json`\n\n## Evaluation, locally\n#### What does evaluation?\nIt compares target results from `tests/expected.json` with results generated by the summarizer\n\n#### Attention\nEval only works if there's an ongoing summarization. e.g. if you started `eval.py` after summarizer finished it's work, `eval.py` will show nothing.\n\n1. export ENV variables\n```bash\nexport GEMINI_API_KEY =\nexport OPENAI_API_KEY = \n```\n2. Copy PDFs from dataset into dataset dir\n```bash\nmkdir ~/code/pdf-summ-coxit/dataset \u0026\u0026 cp /path/to/your/pdfs/* ~/code/pdf-summ-coxit/dataset \n```\n3. Run eval.py\n```bash\ncd ~/code/pdf-summ-coxit/dataset\n```\n```bash\npython tests/eval.py -d dataset\n```\n4. Run summarizer\n```bash\npython -m src.core.main -d dataset\n```\nAs PDFs getting processed, watch STDOUT of `eval.py` for results and `output.csv`, `output_parts.csv` in `~/code/pdf-summ-coxit/dataset`\n\n## Evaluation, docker / compose\n\n\n\n\n1. Start container (see docker / docker-compose usage)\n2. Inside a container, run eval.py\n```bash\ndocker exec -it \u003ccontainer_name\u003e bash\n```\n\n```bash\npython tests/eval.py -d target_dir\n```\n\n#### Video: how to run eval\nhttps://github.com/user-attachments/assets/6fb0b2b9-6a17-4b9e-afd9-79b377d1e8aa\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalaises%2Fpdf-summ-coxit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvalaises%2Fpdf-summ-coxit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalaises%2Fpdf-summ-coxit/lists"}