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 from files. Supports images, PDFs, and Microsoft Office documents. Perfect for protecting your privacy before sharing files online.
โจ Features
- Multi-format support - Images (JPEG, PNG), PDFs, and Office docs (Word, Excel, PowerPoint)
- Concurrent processing - Process 1000+ files efficiently with ThreadPoolExecutor
- Dry-run mode - Preview what would be scrubbed without making changes
- Smart format detection - Uses library-level format detection, not just file extensions
- Beautiful CLI - Rich progress bars and formatted output
- Privacy-first - Removes GPS coordinates, author info, timestamps, camera data
๐ Supported Formats
| Category | Extensions | Metadata Removed |
|---|---|---|
| Images | .jpg, .jpeg, .png |
EXIF, GPS, camera info, timestamps |
.pdf |
Author, creator, producer, dates | |
| Word | .docx |
Author, title, comments, keywords |
| Excel | .xlsx, .xlsm, .xltx, .xltm |
Author, title, company, comments |
| PowerPoint | .pptx, .pptm, .potx, .potm |
Author, title, comments, keywords |
๐ 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 document.pdf
# Scrub metadata and save to output folder
mst scrub photo.jpg --output ./cleaned
# Batch process entire folder
mst scrub ./documents -r -ext docx --output ./cleaned
๐ Commands
mst read - View Metadata
mst read photo.jpg # Single file
mst read report.pdf # PDF file
mst read ./docs -r -ext docx # All Word docs recursively
mst scrub - Remove Metadata
mst scrub photo.jpg --output ./out # Single file
mst scrub ./photos -r -ext jpg -o ./out # All JPEGs in directory
mst scrub ./docs -r -ext pdf --dry-run # Preview PDF scrubbing
mst scrub ./files -r -ext xlsx -w 8 # 8 concurrent workers
CLI Options
| Option | Description |
|---|---|
-r, --recursive |
Process directories recursively |
-ext, --extension |
Filter by file extension |
-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
โ โโโ metadata_handler.py # Abstract base class
โ โโโ image_handler.py # JPEG/PNG handler
โ โโโ pdf_handler.py # PDF handler
โ โโโ excel_handler.py # Excel handler
โ โโโ powerpoint_handler.py # PowerPoint handler
โ โโโ worddoc_handler.py # Word document 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-runto preview changes before committing - GPS coordinates are completely stripped for privacy
- Author information is removed from all supported formats
- 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file metadata_scrubber-0.2.0.tar.gz.
File metadata
- Download URL: metadata_scrubber-0.2.0.tar.gz
- Upload date:
- Size: 2.9 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0ce8e570f8a35ade4364e6f56748c89544d9cd43ca6a50b1664593e539b10529
|
|
| MD5 |
b43d630f6295025fd4a0f933916117fe
|
|
| BLAKE2b-256 |
4a0b7e8e6dd1e1172a9f0a2ecb0b209214504c0e26c7afe6ca010328b3212e3e
|
Provenance
The following attestation bundles were made for metadata_scrubber-0.2.0.tar.gz:
Publisher:
publish.yml on Heritage-XioN/metadata-scrubber-tool
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
metadata_scrubber-0.2.0.tar.gz -
Subject digest:
0ce8e570f8a35ade4364e6f56748c89544d9cd43ca6a50b1664593e539b10529 - Sigstore transparency entry: 813223353
- Sigstore integration time:
-
Permalink:
Heritage-XioN/metadata-scrubber-tool@a10d6b566bac45a438f0c6334f0c44393b0eb62b -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/Heritage-XioN
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a10d6b566bac45a438f0c6334f0c44393b0eb62b -
Trigger Event:
release
-
Statement type:
File details
Details for the file metadata_scrubber-0.2.0-py3-none-any.whl.
File metadata
- Download URL: metadata_scrubber-0.2.0-py3-none-any.whl
- Upload date:
- Size: 30.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
988631f046c0257101674c111be54fc3270567420f7d1d4531d595d5de9afda3
|
|
| MD5 |
addde03f6d6a487d60503c1f86105d8d
|
|
| BLAKE2b-256 |
806415d78acfa389f1b7ed1126d0d0bd7d6bd53764699903031aeb52f4bf6e12
|
Provenance
The following attestation bundles were made for metadata_scrubber-0.2.0-py3-none-any.whl:
Publisher:
publish.yml on Heritage-XioN/metadata-scrubber-tool
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
metadata_scrubber-0.2.0-py3-none-any.whl -
Subject digest:
988631f046c0257101674c111be54fc3270567420f7d1d4531d595d5de9afda3 - Sigstore transparency entry: 813223354
- Sigstore integration time:
-
Permalink:
Heritage-XioN/metadata-scrubber-tool@a10d6b566bac45a438f0c6334f0c44393b0eb62b -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/Heritage-XioN
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a10d6b566bac45a438f0c6334f0c44393b0eb62b -
Trigger Event:
release
-
Statement type: