Skip to main content

PDF Auto Highlighter

Project description

pah

PyPI - pah

PDF Auto Highlighter

Usage

pip install pah

As a CLI tool

$ pah --help
usage: pah [-h] -o OUTPUT -m MODEL -p PROMPT [--output-highlights OUTPUT_HIGHLIGHTS] [--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
  -o, --output OUTPUT   Output PDF file with highlights (default: output\example_highlighted.pdf)
  -m, --model MODEL     LLM model to use (See https://litellm.vercel.app/docs/providers)
  -p, --prompt PROMPT   Prompt to use for highlighting (default: Extract the most important sections of the text for helping the user understand the content
                        of the PDF document. )
  --output-highlights OUTPUT_HIGHLIGHTS
                        Output JSON file for highlights (default: output\highlights.json)
  --log-level {DEBUG,INFO,WARNING,ERROR,CRITICAL}
                        Logging level (default: INFO)
pah input.pdf --output_pdf_path output.pdf --llm_model gpt-4o

As a Python library

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()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pah-1.2.0.tar.gz (46.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pah-1.2.0-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file pah-1.2.0.tar.gz.

File metadata

  • Download URL: pah-1.2.0.tar.gz
  • Upload date:
  • Size: 46.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.8

File hashes

Hashes for pah-1.2.0.tar.gz
Algorithm Hash digest
SHA256 b324ea45a84ffb86ca244d4b935f6a94841b62aa9019cf0243478cf84621486e
MD5 2c2504941c3cfa3f5c11af1dc2969dad
BLAKE2b-256 5afa587d0d375c38f51785e840c36e1528af10c67c669d0dccb677a63e39a895

See more details on using hashes here.

File details

Details for the file pah-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: pah-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 7.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.8

File hashes

Hashes for pah-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 aeadb330e3f415ea1a8775e9de827517209fa52ef92cb7de8905c09583eadc77
MD5 def9a54d9309cda75d6f2bdb9005b66b
BLAKE2b-256 ceda430d7a155120601acbc2509c21887ee3a164780450c40139cb6662d1dd9b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page