LLM plugin for loading text from PDF files (local or URL)
Project description
llm-plugin-pdf
LLM plugin for loading text from PDF files (local or URL) using PyMuPDF.
Installation
Install this plugin in the same environment as LLM.
llm install llm-plugin-pdf
This plugin requires the PyMuPDF and requests packages.
Usage
This plugin adds support for the pdf: fragment prefix. You can use it to load the full text content of a PDF from a local file path or a web URL.
# Load from a local file
llm fragment pdf:/path/to/your/document.pdf
# Load from a URL
llm fragment pdf:https://example.com/some-document.pdf
You can pipe the output to LLM commands:
llm fragment pdf:https://arxiv.org/pdf/2310.06825.pdf | llm -s "Summarize this PDF"
Development
To set up this plugin locally, first checkout the code. Then create a new virtual environment:
cd llm-pdf
python -m venv venv
source venv/bin/activate
Now install the dependencies and test dependencies:
# Install in editable mode with test dependencies
python -m pip install -e '.[test]'
To run the tests:
pytest
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file llm_plugin_pdf-0.1.tar.gz.
File metadata
- Download URL: llm_plugin_pdf-0.1.tar.gz
- Upload date:
- Size: 8.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3cbfad64173988b4ff80052458710da18fd3010ea6eb63ab2ff4d395bb06019b
|
|
| MD5 |
e65713cbfb3f9c4d93bb54f26570b61b
|
|
| BLAKE2b-256 |
4e2b9e4ab82e60fb13ad522d8583e275fa648a11253b110ebfc59b96b5fa1bc4
|
Provenance
The following attestation bundles were made for llm_plugin_pdf-0.1.tar.gz:
Publisher:
publish.yml on agustif/llm-pdf
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
llm_plugin_pdf-0.1.tar.gz -
Subject digest:
3cbfad64173988b4ff80052458710da18fd3010ea6eb63ab2ff4d395bb06019b - Sigstore transparency entry: 202508130
- Sigstore integration time:
-
Permalink:
agustif/llm-pdf@c43406c2e2fdd87c595c479447483138c6669fac -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/agustif
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c43406c2e2fdd87c595c479447483138c6669fac -
Trigger Event:
release
-
Statement type:
File details
Details for the file llm_plugin_pdf-0.1-py3-none-any.whl.
File metadata
- Download URL: llm_plugin_pdf-0.1-py3-none-any.whl
- Upload date:
- Size: 8.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2766a4b86c1e2638a463f1882d029e8d6cf13fd15bcde1b7ec9ec2a93cdba928
|
|
| MD5 |
a6263fb2b54a68f69fb1f120e4562456
|
|
| BLAKE2b-256 |
65c9685a3256f4eb489bf38c69bb6c33ea8cf75555449a94d4c7719d529b0294
|
Provenance
The following attestation bundles were made for llm_plugin_pdf-0.1-py3-none-any.whl:
Publisher:
publish.yml on agustif/llm-pdf
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
llm_plugin_pdf-0.1-py3-none-any.whl -
Subject digest:
2766a4b86c1e2638a463f1882d029e8d6cf13fd15bcde1b7ec9ec2a93cdba928 - Sigstore transparency entry: 202508133
- Sigstore integration time:
-
Permalink:
agustif/llm-pdf@c43406c2e2fdd87c595c479447483138c6669fac -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/agustif
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c43406c2e2fdd87c595c479447483138c6669fac -
Trigger Event:
release
-
Statement type: