Skip to content

Shega-PT/MetadataExplorer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

17 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ” Metadata Explorer v2

Python Version License: GPL v3 PRs Welcome

A powerful, cross-platform Python tool for deep metadata extraction from various file types. Supports JSON, CSV, and log output with multi-threading. Perfect for digital forensics, organization, and curiosity!

✨ Features

  • πŸ” Deep Metadata Extraction - Supports images (EXIF, GPS), audio (ID3), video, and documents
  • πŸ“ Recursive Scanning - Explores entire directory structures
  • πŸ“Š Detailed Reports - Generates metadata logs, JSON, or CSV reports
  • πŸš€ Cross-Platform - Works on Windows, macOS, and Linux
  • πŸ›‘οΈ Error Resilient - Continues scanning even if some files fail
  • πŸ“ˆ Smart Filtering - Automatically skips system files and directories
  • ⚑ Multi-Threading - Faster scans with parallel processing
  • 🎯 Type Filtering - Scan only images, audio, video, or documents
  • 🧭 GPS Conversion - Converts GPS coordinates to decimal degrees
  • πŸ“ Human-Readable - File sizes and durations in readable format

πŸ“ Supported Formats

Category Formats Metadata Extracted
Images JPG, PNG, HEIC, TIFF, WebP, BMP, GIF EXIF, GPS, Dimensions, DPI, Camera settings
Audio MP3, FLAC, M4A, OGG, WAV, AAC, Opus, WMA ID3 tags, Duration, Bitrate, Sample rate
Video MP4, MOV, AVI, MKV, WMV, FLV, WebM Duration, Resolution, Codec, Framerate
Documents PDF, DOCX, XLSX Author, Pages, Title, Created/Modified dates
RAW CR2, CR3, NEF, ARW, DNG, ORF, RW2, RAF EXIF metadata via exifread
All Files Any file type Size, MIME type, Creation/modification dates

πŸš€ Quick Start

Installation

  1. Clone the repository:

    git clone https://github.com/Shega-PT/metadata-explorer.git
    cd metadata-explorer
  2. Install dependencies:

    pip install -r requirements.txt

Basic Usage

No arguments β€” scans the files/ subfolder if it exists and has content; otherwise prompts for a path:

python universal.py
No 'files/' subfolder found. Enter directory path to scan (or 'q' to quit):

Place your files in a files/ folder and run without arguments:

mkdir -p files
cp ~/photo.jpg files/
python universal.py

Scan a specific directory explicitly:

python universal.py /path/to/your/files

Scan your entire pictures folder:

python universal.py ~/Pictures

Output Formats

JSON output:

python universal.py files --format json

CSV output:

python universal.py files --format csv -o report.csv

Advanced Usage

Filter by file type:

python universal.py files --type images

With progress bar and 4 threads:

python universal.py files --progress --threads 4

Dry-run (list files only):

python universal.py files --dry-run

Options

Flag Description Default
directory Directory to scan files/ subfolder, or prompts interactively
-o, --output Output file path metadata_report.{format}
-f, --format Output format: log, json, csv log
-t, --type File type filter: all, images, audio, video, documents all
--dry-run List files without extracting metadata off
-p, --progress Show progress bar off
-n, --threads Number of worker threads (0 = auto) 1
-v, --verbose Debug output off

πŸ“Š Example Output

============================================================
DIRECTORY: Vacation_Photos
============================================================

FILE: beach_sunset.jpg
PATH: Vacation_Photos/beach_sunset.jpg
METADATA:
  β€’ IMG_Format: JPEG
  β€’ IMG_Dimensions: 1920x1080
  β€’ IMG_EXIF_DateTimeOriginal: 2023:07:15 18:32:45
  β€’ IMG_GPS_LatitudeDecimal: 38.723167
  β€’ IMG_GPS_LongitudeDecimal: -9.154830
  β€’ IMG_Image_Make: Canon
  β€’ IMG_Image_Model: Canon EOS R5
  β€’ FILE_Size: 8.06 MB
  β€’ FILE_MimeType: image/jpeg
  β€’ FILE_Created: 2023-07-15T18:32:45

πŸ› οΈ Advanced Usage

Customizing Ignored Files

Edit the ignored_dirs and ignored_files sets in the FileManager class to customize what gets skipped.

Multiple Output Formats

The script defaults to metadata_report.log. Use --format json for JSON or --format csv for CSV output.

Integrating with Other Tools

Use the UniversalMetadataExtractor class independently in your projects:

from pathlib import Path
from universal import UniversalMetadataExtractor

extractor = UniversalMetadataExtractor()
metadata = extractor.get_all_metadata(Path("your_file.jpg"))
print(metadata.get("IMG_EXIF_DateTimeOriginal"))

πŸ“ Project Structure

metadata-explorer/
β”œβ”€β”€ universal.py          # Main script
β”œβ”€β”€ requirements.txt      # Dependencies
β”œβ”€β”€ README.md             # This file
β”œβ”€β”€ LICENSE               # GNU GPLv3 license
β”œβ”€β”€ __init__.py           # Package init
β”œβ”€β”€ metadata_report.log   # Generated report (example)
└── files/                # Default input folder (auto-scanned)

🀝 Contributing

Contributions are welcome! Here's how you can help:

  • Report Bugs - Open an issue with detailed information
  • Suggest Features - Share your ideas for improvements
  • Submit Pull Requests - Add support for new file formats or features

Development Setup

Clone and install in development mode:

git clone https://github.com/Shega-PT/metadata-explorer.git
cd metadata-explorer
pip install -e .
pip install -r requirements-dev.txt  # Optional dev dependencies

πŸ“„ License

Metadata Explorer v2 β€” Copyright (C) 2026 ShegaPT

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the LICENSE file for details.

πŸ™ Acknowledgments

  • exifread for EXIF data extraction
  • mutagen for audio metadata
  • hachoir for video metadata analysis
  • pymediainfo for detailed video metadata
  • Pillow for image processing capabilities
  • pillow-heif for HEIC/HEIF image support
  • python-magic for MIME type detection
  • pypdf for PDF metadata
  • python-docx for DOCX metadata
  • openpyxl for XLSX metadata
  • tqdm for progress bar

⚠️ Disclaimer

This tool is for educational and organizational purposes only. Always respect privacy laws and obtain proper permissions before scanning others' files.


Made with ❀️ for digital explorers everywhere ⭐ If you find this useful, please consider starring the repository!

About

Metadata Explorer - A powerful Python tool that recursively scans directories and extracts hidden metadata from images, audio, and video files. Discover the invisible data in your digital files!

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages