Skip to main content

A privacy-focused CLI tool that removes sensitive metadata from image files

Project description

🔒 Metadata Scrubber

A privacy-focused CLI tool that removes sensitive metadata (EXIF, GPS, author info) from image files. Perfect for protecting your privacy before sharing photos online.

Tests Python 3.10+ License: MIT

✨ Features

  • Multi-format support - JPEG, PNG (with PDF/Office planned)
  • Concurrent processing - Process 1000+ files efficiently with ThreadPoolExecutor
  • Dry-run mode - Preview what would be scrubbed without making changes
  • Smart format detection - Uses Pillow's format detection, not just file extensions
  • Beautiful CLI - Rich progress bars and formatted output
  • Privacy-first - Removes GPS coordinates, camera info, timestamps, author data

🚀 Quick Start

Installation

# Using uv (recommended)
uv pip install metadata-scrubber

# Or clone and install locally
git clone https://github.com/Heritage-XioN/metadata-scrubber-tool.git
cd metadata-scrubber-tool
uv sync

Basic Usage

# Read metadata from a file
mst read photo.jpg

# Scrub metadata and save to output folder
mst scrub photo.jpg --output ./cleaned

# Batch process entire folder
mst scrub ./photos -r -ext jpg --output ./cleaned

📖 Commands

mst read - View Metadata

mst read photo.jpg                      # Single file
mst read ./photos -r -ext jpg           # Directory (recursive)

mst scrub - Remove Metadata

mst scrub photo.jpg --output ./out      # Single file
mst scrub ./photos -r -ext jpg -o ./out # Directory
mst scrub ./photos -r -ext jpg --dry-run # Preview only
mst scrub ./photos -r -ext jpg -w 8     # 8 concurrent workers

CLI Options

Option Description
-r, --recursive Process directories recursively
-ext, --extension Filter by file extension (jpg, png)
-o, --output Output directory for cleaned files
-d, --dry-run Preview without making changes
-w, --workers Number of concurrent workers
-V, --verbose Show detailed debug logs
-v, --version Show version

🛠️ Development

Setup

git clone https://github.com/Heritage-XioN/metadata-scrubber-tool.git
cd metadata-scrubber-tool

# Install with dev dependencies
uv sync --all-extras

# Run tests
pytest

# Run linting
ruff check .

# Run type checking
mypy src

Project Structure

src/
├── main.py                 # CLI entry point (Typer app)
├── commands/
│   ├── read.py             # Read metadata command
│   └── scrub.py            # Scrub metadata command
├── services/
│   ├── metadata_factory.py # Factory for creating handlers
│   ├── image_handler.py    # JPEG/PNG handler
│   └── batch_processor.py  # Concurrent batch processing
└── core/
    ├── jpeg_metadata.py    # JPEG EXIF processor
    └── png_metadata.py     # PNG metadata processor

⚠️ Security Considerations

  • Original files are never modified - processed copies are created
  • Use --dry-run to preview changes before committing
  • GPS coordinates are completely stripped for privacy
  • Always backup files before scrubbing in production

📄 License

MIT License - See LICENSE for details.


Made with ❤️ for privacy

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

metadata_scrubber-0.1.1.tar.gz (74.0 kB view details)

Uploaded Source

Built Distribution

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

metadata_scrubber-0.1.1-py3-none-any.whl (22.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: metadata_scrubber-0.1.1.tar.gz
  • Upload date:
  • Size: 74.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for metadata_scrubber-0.1.1.tar.gz
Algorithm Hash digest
SHA256 0cac9f89ee32ef31cfa76c0dd1de76bf1a99ef419f167ccba15d760fcb8fe268
MD5 280f3e4d3dfe61f6c247d654081a0710
BLAKE2b-256 9a4e6679a50a3ff19484dd0088008d1932778c1ccfe79af5cf04efb8527ed24e

See more details on using hashes here.

Provenance

The following attestation bundles were made for metadata_scrubber-0.1.1.tar.gz:

Publisher: publish.yml on Heritage-XioN/metadata-scrubber-tool

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

File details

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

File metadata

File hashes

Hashes for metadata_scrubber-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 999a7829500438761bcc7c367416bf216589d2f49f76eb36b7bead367feebcba
MD5 44fe54f5e452f32ab2fefdadbd01e973
BLAKE2b-256 89e9dc77e40128e2b5944737f32d0abb8e32c6d959d5f21ca65b886102967784

See more details on using hashes here.

Provenance

The following attestation bundles were made for metadata_scrubber-0.1.1-py3-none-any.whl:

Publisher: publish.yml on Heritage-XioN/metadata-scrubber-tool

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