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.1.tar.gz (11.4 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.1-py3-none-any.whl (12.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: chunkops-0.1.1.tar.gz
  • Upload date:
  • Size: 11.4 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.1.tar.gz
Algorithm Hash digest
SHA256 95af60e16ef499c6943916e2b7a45aeb325b65446e00bb9d007876cdb03018c1
MD5 92fb48b0efffe3156fe6bc1012c28083
BLAKE2b-256 f0187dcb4102017289e3b89215d6f4cd85f3f114639ef812a9d5e69f126b6ee2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chunkops-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 12.6 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ab0d6c269a760a384852e58afffd14f64c67320fe5d14dd7b04c69c616fe75e9
MD5 b9f0f2565946f84f1cc3c8406d56fd2c
BLAKE2b-256 9db66c187476b7b1111cf87fbb911df877b0010ec09c2a58eb6fb5941f905076

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