Skip to main content

CLI tool for detecting duplicate content in PDF documents

Project description

ChunkOps CLI

A command-line tool for detecting duplicate and near-duplicate content in PDF documents.

Installation

From PyPI (when published)

pip install chunkops

From Source (Development)

cd chunkops-cli
python3 -m pip install -e .

Note: Use python3 -m pip if pip command is not found in your PATH.

Important: Make sure your virtual environment is activated:

source /path/to/venv/bin/activate  # Activate your venv
chunkops --version                  # Should work now

Or use the full path:

/path/to/venv/bin/chunkops --version

Usage

Scan a folder of PDFs and generate a JSON report of duplicates:

chunkops scan /path/to/pdf/folder --output report.json

Options

  • --output, -o: Path to output JSON file (default: duplicates_report.json)
  • --threshold: Similarity threshold for near-duplicates (0.0-1.0, default: 0.90)
  • --exact-threshold: Threshold for exact duplicates (default: 1.0)
  • --verbose, -v: Enable verbose output

Example

chunkops scan ./documents --output duplicates.json --threshold 0.95

Output Format

The JSON report contains:

{
  "scan_date": "2024-01-15T10:30:00Z",
  "total_files": 10,
  "total_chunks": 245,
  "duplicates": [
    {
      "type": "EXACT_DUPLICATE",
      "file_a": "document1.pdf",
      "file_b": "document2.pdf",
      "similarity": 1.0,
      "chunk_a_preview": "...",
      "chunk_b_preview": "..."
    },
    {
      "type": "NEAR_DUPLICATE",
      "file_a": "document3.pdf",
      "file_b": "document4.pdf",
      "similarity": 0.95,
      "chunk_a_preview": "...",
      "chunk_b_preview": "..."
    }
  ],
  "summary": {
    "exact_duplicates": 2,
    "near_duplicates": 5,
    "unique_content": 238
  }
}

Limitations

  • Local only: No cloud sync, runs entirely on your machine
  • No UI: Command-line interface only
  • PDF only: Currently supports PDF files only
  • Single scan: Each scan is independent (no persistent history)

License

MIT

Support

Visit chunkops.ai for more information.

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

chunkops-0.1.0.tar.gz (10.3 kB view details)

Uploaded Source

Built Distribution

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

chunkops-0.1.0-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

File details

Details for the file chunkops-0.1.0.tar.gz.

File metadata

  • Download URL: chunkops-0.1.0.tar.gz
  • Upload date:
  • Size: 10.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.7

File hashes

Hashes for chunkops-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b5633e09891a68e509d768a2cae83f66cf27f1a5cec9ec2b9d7f90b03e3224f8
MD5 453da6363f1b9662a0636cddf7351007
BLAKE2b-256 d4aaf858cad8b9ca9b0bb696a41e5a551ca7a4f8639b755e62713b3576be133e

See more details on using hashes here.

File details

Details for the file chunkops-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: chunkops-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 11.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.7

File hashes

Hashes for chunkops-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6806fb75ad40140f668e509187e023e68e99cc815bc4953af2ae056ffa4c8742
MD5 3caec024c388b4247ce4d1c997110d99
BLAKE2b-256 51d3f78bb5b80ad64bfbcbf81048090f42626f2096a37ee3970b4cb42ff895bc

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