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.1.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.1-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pah-1.2.1.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.1.tar.gz
Algorithm Hash digest
SHA256 28b4e24378cff015119aeec2ed8c06090729e2a0b6ad879bc43ba876a0908d16
MD5 2ae8b74a387da3bbb89094220ff3c33e
BLAKE2b-256 51b07e8da86031b28a4689de8db782fd7ef67bc0c2bbf1eb034b256b13fa3d78

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pah-1.2.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1cb18ce0db2eb001d33c5dac8de5274a7b1671e8cf0b6581b8b3b17428680ea9
MD5 dcc037d511ecc7bc1c5d67be8eff3e03
BLAKE2b-256 7b1750deb65093ebd309882ce04787e206b9e9befd64266375079515be69e7da

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