Transform your file metadata with ease
Project description
MetaMorph
Transform your file metadata with ease. A cross-platform Python CLI tool to view and edit metadata for various file types including PDFs, images, audio files, and general file attributes.
Features
- PDF Files: Edit metadata like Title, Author, Subject, Creator, Producer, etc.
- Image Files: View EXIF data (JPG, PNG, TIFF, BMP, GIF)
- Audio Files: Edit tags for MP3, MP4, M4A, FLAC, OGG, WAV
- General Files: Modify timestamps and permissions
- macOS Extended Attributes: View and edit "Where from" URLs, Finder comments, and view Finder tags
Installation
Option 1: Install via pip (Recommended)
pip install metamorph-cli
After installation, you can use it anywhere:
metamorph yourfile.pdf
Option 2: Install from source
git clone https://github.com/yourusername/metamorph.git
cd metamorph
./install.sh
Option 3: Run locally (Development)
git clone https://github.com/yourusername/metamorph.git
cd metamorph
pip install -r requirements.txt
./mm yourfile.pdf
Usage
Interactive Mode (Edit Metadata)
metamorph document.pdf
This will:
- Display all current metadata
- Prompt you to edit each field
- Ask for confirmation before saving
View-Only Mode
metamorph --view-only document.pdf
metamorph -v photo.jpg
JSON Output
metamorph --json song.mp3
Examples
Edit PDF metadata
metamorph invoice.pdf
View image EXIF data
metamorph --view-only vacation.jpg
Edit audio tags
metamorph song.mp3
View file attributes as JSON
metamorph --json document.txt
Supported File Types
- PDF: .pdf
- Images: .jpg, .jpeg, .png, .tiff, .bmp, .gif
- Audio: .mp3, .mp4, .m4a, .flac, .ogg, .wav
- General: Any file (for basic attributes)
How It Works
The tool automatically detects the file type and uses the appropriate library:
- PyPDF2 for PDF files
- Pillow for image EXIF data
- Mutagen for audio file tags
- os/pathlib for general file attributes
- xattr (macOS) for extended attributes like "Where from" and Finder comments
Metadata Types
macOS Extended Attributes
On macOS, MetaMorph can read and edit special Finder metadata:
- WhereFrom: The URL where a file was downloaded from
- FinderComment: Comments visible in Finder's Get Info panel
- FinderTags: View color tags (read-only)
PDF Metadata
Standard PDF fields like Title, Author, Subject, Keywords, Creator, Producer, etc.
Image EXIF
View EXIF data including camera settings, GPS coordinates, timestamps (editing limited)
Audio Tags
Common ID3 tags: title, artist, album, date, genre, track number, etc.
Notes
- Image EXIF editing is limited (view-only for most fields)
- Some metadata fields are read-only (e.g., file size, page count, Finder tags)
- macOS extended attributes require macOS (uses
xattrcommand) - Always backup important files before editing metadata
- Press
Ctrl+Cor type 'q' to cancel editing at any time
License
MIT
Project details
Release history Release notifications | RSS feed
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 metamorph_cli-1.0.0.tar.gz.
File metadata
- Download URL: metamorph_cli-1.0.0.tar.gz
- Upload date:
- Size: 9.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5560f8ba4feec26a03d6baa2c1d77c3315ff79c2cdcd97bd74b3e345f758ebbd
|
|
| MD5 |
4483eef6335c72dec02f632e61db7edc
|
|
| BLAKE2b-256 |
f5584a86328fd9a0736455256cc4c761a09b359ef422548e2517050081e41c80
|
File details
Details for the file metamorph_cli-1.0.0-py3-none-any.whl.
File metadata
- Download URL: metamorph_cli-1.0.0-py3-none-any.whl
- Upload date:
- Size: 8.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6296a2780dbbbc7ae7f7c2fed1557242feda5d24c9341f2a373a5229e835aca0
|
|
| MD5 |
569126d92acf64b8605aa0383b02ed12
|
|
| BLAKE2b-256 |
6b836c46ece0b7ae6fabf5d4e66ee917acab9c7a0df188ebfcb753108a7da60e
|