Metadata-Version: 2.4
Name: pah
Version: 1.0.0
Summary: PDF Auto Highlighter
Project-URL: homepage, https://github.com/ras0q/pah
Project-URL: issues, https://github.com/ras0q/pah/issues
Project-URL: repository, https://github.com/ras0q/pah
Author: ras0q
License: MIT License
        
        Copyright (c) 2025 Kira Kawai
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Requires-Python: >=3.13
Requires-Dist: litellm>=1.71.2
Requires-Dist: pydantic>=2.11.5
Requires-Dist: pymupdf>=1.26.0
Description-Content-Type: text/markdown

# pah

[![PyPI - pah](https://img.shields.io/pypi/v/pah)](https://pypi.org/project/pah/)

PDF Auto Highlighter

## Usage

```bash
pip install pah
```

### As a CLI tool

```bash
$ uv run pah --help
usage: pah [-h] --output_pdf_path OUTPUT_PDF_PATH --llm_model LLM_MODEL [--output_highlights_path OUTPUT_HIGHLIGHTS_PATH]
           [--log_level {DEBUG,INFO,WARNING,ERROR,CRITICAL}]
           input_pdf_path

pah: PDF AutoAuto Highlighter

positional arguments:
  input_pdf_path        Input PDF file

options:
  -h, --help            show this help message and exit
  --output_pdf_path OUTPUT_PDF_PATH
                        Output PDF file with highlights
  --llm_model LLM_MODEL
                        LLM model to use (See https://litellm.vercel.app/docs/providers)
  --output_highlights_path OUTPUT_HIGHLIGHTS_PATH
                        Output JSON file for highlights
  --log_level {DEBUG,INFO,WARNING,ERROR,CRITICAL}
                        Logging level
```

```bash
pah input.pdf --output_pdf_path output.pdf --llm_model gpt-4o
```

### As a Python library

```python
from pah import PAH

pah = PAH(
    input_pdf_path="input.pdf",
    output_pdf_path="output.pdf",
    llm_model="gpt-4o",
    output_highlights_path="highlights.json"
)
pah.highlight()
```
