Python utilities for LENS, a local-first qualitative data analysis (QDA) tool.
Project description
lens-qda
Python utilities for LENS, a local-first qualitative data analysis (QDA) desktop application.
This package bundles the same PDF text-extraction pipeline that the LENS desktop app uses to ingest PDF documents, exposing it as a small CLI so it can also be used directly from Python or from shell scripts.
Install
pip install lens-qda
Requires Python 3.8+ and the prebuilt wheels for pdfplumber and its
dependencies (cryptography, pillow, pdfminer.six, ...) on PyPI; no
compiler is needed on supported platforms.
CLI usage
# Print plain text extracted from a PDF (one paragraph per page):
lens-qda extract path/to/paper.pdf
# Emit the same JSON envelope the LENS desktop sidecar produces:
lens-qda extract paper.pdf --json
# Save the extracted text to a file:
lens-qda extract paper.pdf -o paper.txt
# Tune pdfplumber's tolerances (defaults match the sidecar):
lens-qda extract paper.pdf --x-tolerance 3 --y-tolerance 3
The --json schema matches the contract the LENS Tauri sidecar already
implements:
{ "success": true, "text": "...all pages, joined by blank lines..." }
On failure:
{ "success": false, "error": "<exception message>" }
(the process exits with status 1 in that case).
Programmatic usage
from pathlib import Path
import json, subprocess
result = subprocess.run(
["lens-qda", "extract", "paper.pdf", "--json"],
capture_output=True, text=True, check=True,
)
envelope = json.loads(result.stdout)
assert envelope["success"], envelope["error"]
corpus = envelope["text"]
License
MIT — same as the parent LENS project.
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 lens_qda-0.2.0rc2.tar.gz.
File metadata
- Download URL: lens_qda-0.2.0rc2.tar.gz
- Upload date:
- Size: 6.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eec2befc6c2611a73ce17faadd0ca604cd690456a5849caa2e8763ba60dea902
|
|
| MD5 |
9029112f94b6eabbed771331b29ff0ee
|
|
| BLAKE2b-256 |
e97a55522d50165a95a06d6e9fae224ccf66771e2a021d4df9da003c20dadf26
|
Provenance
The following attestation bundles were made for lens_qda-0.2.0rc2.tar.gz:
Publisher:
release.yml on mabo-du/lens
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lens_qda-0.2.0rc2.tar.gz -
Subject digest:
eec2befc6c2611a73ce17faadd0ca604cd690456a5849caa2e8763ba60dea902 - Sigstore transparency entry: 1958282724
- Sigstore integration time:
-
Permalink:
mabo-du/lens@7658a9feb5de68311f8e3891fa0aaeba8f180fa4 -
Branch / Tag:
refs/tags/v0.2.0-rc.2 - Owner: https://github.com/mabo-du
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@7658a9feb5de68311f8e3891fa0aaeba8f180fa4 -
Trigger Event:
push
-
Statement type:
File details
Details for the file lens_qda-0.2.0rc2-py3-none-any.whl.
File metadata
- Download URL: lens_qda-0.2.0rc2-py3-none-any.whl
- Upload date:
- Size: 6.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
32c3a8315de2020a67dc0c2fc14014c504e0ba251c3d1ebd3fd1f8d29b07e90a
|
|
| MD5 |
2ce291c8c6ebff832661d74ef20b98f3
|
|
| BLAKE2b-256 |
f633f430d434c323f687fcb77a393e46fa7dfaf356d9620bc21824840fd28176
|
Provenance
The following attestation bundles were made for lens_qda-0.2.0rc2-py3-none-any.whl:
Publisher:
release.yml on mabo-du/lens
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lens_qda-0.2.0rc2-py3-none-any.whl -
Subject digest:
32c3a8315de2020a67dc0c2fc14014c504e0ba251c3d1ebd3fd1f8d29b07e90a - Sigstore transparency entry: 1958282806
- Sigstore integration time:
-
Permalink:
mabo-du/lens@7658a9feb5de68311f8e3891fa0aaeba8f180fa4 -
Branch / Tag:
refs/tags/v0.2.0-rc.2 - Owner: https://github.com/mabo-du
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@7658a9feb5de68311f8e3891fa0aaeba8f180fa4 -
Trigger Event:
push
-
Statement type: