Building 70 Projects ranging from beginner to advanced so anyone can — learn from, build upon, use as a reference, or even copy directly. Gamified Cybersecurity learning 👇
Go to file
HERITAGE-XION ffa2bda559
Merge pull request #4 from Heritage-XioN/add-pdf-metadata-processing
Add pdf metadata processing
2026-01-09 17:31:13 +01:00
.github/workflows added publish workflow 2026-01-07 16:32:04 +01:00
scripts metadata-scrubber-tool: 2026-01-06 21:49:46 +01:00
src metadata-scrubber-tool: 2026-01-09 17:27:22 +01:00
tests metadata-scrubber-tool: 2026-01-09 17:27:22 +01:00
typings/piexif metadata-scrubber-tool: 2026-01-07 14:40:53 +01:00
.gitignore metadata-scrubber-tool: 2026-01-07 14:40:53 +01:00
.python-version metadata-scrubber-tool: 2026-01-07 15:12:15 +01:00
LICENSE Add MIT License to the project 2026-01-06 02:01:43 +01:00
README.md updated readme and project version 2026-01-07 17:15:06 +01:00
docker-compose.yml Metadata-Scrubber-Tool: 2026-01-03 16:02:14 +01:00
main.py metadata-scrubber-tool: 2026-01-07 15:12:15 +01:00
pyproject.toml metadata-scrubber-tool: 2026-01-09 12:06:51 +01:00
pyrightconfig.json metadata-scrubber-tool: 2026-01-07 14:38:16 +01:00
requirements.txt metadata-scrubber-tool: 2026-01-05 17:15:13 +01:00
uv.lock metadata-scrubber-tool: 2026-01-09 12:06:51 +01:00

README.md

🔒 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