Skip to main content

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


Download files

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

Source Distribution

lens_qda-0.2.3.tar.gz (8.7 kB view details)

Uploaded Source

Built Distribution

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

lens_qda-0.2.3-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file lens_qda-0.2.3.tar.gz.

File metadata

  • Download URL: lens_qda-0.2.3.tar.gz
  • Upload date:
  • Size: 8.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for lens_qda-0.2.3.tar.gz
Algorithm Hash digest
SHA256 52429cb59dedb89659948bf17d840c2cb9a3f76e4dd3835a68efa65262e3ac87
MD5 41a2e9c4b71f2ce5c880ffc572f918e3
BLAKE2b-256 001d752f35f6aee3ef8491944716324c8fb3f2d815d84decc854f714219466e5

See more details on using hashes here.

Provenance

The following attestation bundles were made for lens_qda-0.2.3.tar.gz:

Publisher: release.yml on mabo-du/lens

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file lens_qda-0.2.3-py3-none-any.whl.

File metadata

  • Download URL: lens_qda-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for lens_qda-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 5b18a6a9f0bfa08e4fbdd4eb658180b506af51b5e5cfc593cdcffa7a640ad634
MD5 58c8d77446b0adef9d3b0364fd7c58da
BLAKE2b-256 cc99e29a64bd12a862a907b065e9465f6e1c6e767d16ffdbaf826c9d362e3a1a

See more details on using hashes here.

Provenance

The following attestation bundles were made for lens_qda-0.2.3-py3-none-any.whl:

Publisher: release.yml on mabo-du/lens

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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