Skip to content

ethanriverpage/memoria

Repository files navigation

me·mo·ri·a /məˈmôrēə/ · noun · the faculty by which the mind stores and remembers information

Transform messy social media exports into well-organized, properly dated media libraries

License: MIT Python 3.7+ Code style: black Platform Support GitHub Issues

FeaturesQuick StartDocumentationPlatformsContributing


Table of Contents


What is Memoria?

Memoria transforms messy social media exports into well-organized, properly dated media libraries.

It takes the JSON metadata files, HTML conversation dumps, and scattered media files from your platform exports and produces a clean collection where every photo and video has its original timestamp, location, and context embedded directly into the file itself - making your memories searchable and sortable in any photo application, now and in the future.

Key Features

Smart Metadata Processing

  • Parses platform-specific formats (JSON, HTML)
  • Extracts dates, locations, and context
  • Preserves captions and message content

Industry-Standard EXIF

  • Embeds all metadata directly into files
  • Works with any photo management app
  • No proprietary databases or sidecar files

Intelligent Organization

  • Groups by platform and account
  • Descriptive, sortable filenames
  • Automatic deduplication

Batch Processing & Integration

  • Process multiple platforms at once
  • Parallel processing support
  • Optional Immich server upload

IMPORTANT DISCLAIMERS

Caution

Backup and Data Loss

While Memoria processes copies of your export files and does not modify the original export directories, I am not responsible for any data loss. Always maintain backups of your original exports before processing.

Warning

AI-Generated Code

This codebase was created with the assistance of AI. It is strongly recommended that you thoroughly review and test the code before using it in any production environment or with irreplaceable data.

Important

Read the Documentation

Please read all documentation carefully before use. This tool makes specific design decisions that may not align with everyone's needs or expectations. Make sure you fully understand the purpose and behavior of this program before processing your data.


What Do You Get?

After processing, your files are transformed with rich metadata embedded directly into each file.

Metadata Embedding

Every processed file gets comprehensive EXIF metadata written using ExifTool:

Standard Tags

Tag Type What's Embedded EXIF Fields
Timestamps Original capture date/time DateTimeOriginal, CreateDate, ModifyDate
GPS Location data when available GPSLatitude, GPSLongitude, GPSAltitude

Source Information

File Type Description Fields
Images ImageDescription, IPTC:Caption-Abstract
Videos Comment, Description

Description Format Examples

Source: iMessage/mac - John Doe in "DM with +14045551234"
Source: Instagram/username/messages - Best Friends - John Doe
Source: Google Photos/john.doe@gmail.com
Source: Snapchat/username/memories - Story from 2023-01-15

Platform captions and message text are preserved inline with the metadata.

File Naming

Files are renamed with descriptive, sortable names that include platform, username, and date:

Platform Example Filename
Google Chat gchat-john.doe-Family Chat-20230115.jpg
iMessage imessage-mac-14045551234-20230115.heic
Instagram Messages instagram-messages-jane_doe-Best Friends-20230220.mp4
Snapchat Messages snap-messages-user123-john-20230310.jpg
Instagram Posts insta-posts-user123-20230405.jpg
Google Photos gphotos-john.doe-IMG_1234.jpg
Organization Structure

Processed files are organized by platform and service/media type:

platform-username-YYYYMMDD/
├── photos/                # Google Photos
│   └── gphotos-john.doe-*.jpg
├── chat/                  # Google Chat
│   └── gchat-john.doe-*.jpg
├── messages/              # iMessage/Instagram/Snapchat Messages
│   └── imessage-mac-*.heic
│   └── *-messages-*.jpg
└── memories/              # Snapchat Memories
    └── snap-*.mp4

Additional Features

  • File modification times set to match original capture dates
  • Files sort correctly in any file browser
  • Easy to navigate and find specific content

The Result

Your media becomes truly portable and future-proof

Every file carries its complete history in industry-standard formats

What's Preserved How It's Stored
When it was taken EXIF timestamps
Where you were GPS coordinates
Who sent it Description metadata
What platform it came from Source tags

Compatible with any photo management application, cloud service, or future software you might use.

Design Philosophy

Memoria makes specific design choices that prioritize data portability and future-proofing.

Core Principles

  • Metadata-First Approach: All context is embedded directly in files using industry-standard EXIF tags, not stored in sidecar files or databases

  • Flat Organization: Files are organized by platform/username, not by albums or conversations, to simplify deduplication and avoid complex folder structures

  • Deduplication by Default: Google Photos automatically deduplicates across albums to save space and reduce processing time

  • Non-Destructive Processing: Original exports are never modified; all operations work on copies

Note

For detailed rationale behind these decisions, see the Design Decisions document.

Supported Platforms

Memoria can process exports from the following platforms:

Platform Service What's Supported
Apple iMessage Mac and iPhone message exports with cross-export deduplication
Google Photos Albums, shared libraries, and photo metadata
Chat Group and direct message media
Voice SMS messages and media
Instagram Messages DM and group chat media
Public Media Posts, archived posts, stories, etc.
Old Format Legacy timestamped exports
Snapchat Memories Saved snaps and stories with overlay embedding
Messages Chat media from conversations

Tip

Each platform has specific export requirements. See our export guides for detailed instructions.

Quick Start

Installation

First, install system dependencies:

# Ubuntu/Debian
sudo apt-get install exiftool ffmpeg

# macOS
brew install exiftool ffmpeg

Then install Python dependencies:

pip install -r requirements.txt
# or for development
pip install -e .

Basic Usage

# Process a single export
./memoria.py /path/to/export -o /path/to/output

# Process multiple exports in parallel
./memoria.py --originals /path/to/all-exports -o /path/to/output

# List available processors
./memoria.py --list-processors

# Enable verbose logging
./memoria.py /path/to/export -o /path/to/output --verbose

Tip

See the Getting Started Guide for detailed installation instructions and the Usage Guide for all command-line options.

Export Guides

Before processing, export your data from the platforms:

Platform Guide What to Export
Apple iMessage Export Guide Messages from Mac or iPhone
Google Google Export Guide Photos, Chat, Voice
Instagram Instagram Export Guide Messages, Posts, Stories
Snapchat Snapchat Export Guide Memories, Messages

Documentation

Getting Started
  • Getting Started - Installation, system requirements, and initial setup
  • Usage Guide - Complete command-line reference and workflows
Platform-Specific Guides
Advanced Topics
Reference
Development

Pro Tips

Scenario Recommendation
First Time? Start with the Getting Started Guide for setup instructions
Important Behaviors Read Common Gotchas to avoid surprises
Export Setup See platform-specific guides for export preparation
Performance Use --workers N to control parallelism
Multiple Exports Use --originals to batch process everything at once
Debugging Enable --verbose for detailed logs
Immich Upload Configure automatic upload to your Immich server
Questions? Check the FAQ for common questions

Contributing

Contributions are welcome! We'd love your help making Memoria better.

Quick Start for Contributors

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Make your changes
  4. Run tests and linting
  5. Submit a pull request

See CONTRIBUTING.md for detailed guidelines on development setup, code standards, and adding new processors.


Acknowledgments

Special thanks to the immich-go project, which provided valuable insights into understanding the structure and handling of Google Photos takeout formats.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Disclaimer: This project is provided as-is for personal use in organizing and preserving your social media exports.

Troubleshooting

Common Issues & Solutions
Issue Solution
exiftool is not installed or ffmpeg not found Install required system dependencies (see Quick Start)
No processors matched input directory Check export structure against platform guides
Import errors Try installing in development mode: pip install -e .
Performance issues See Usage Guide for optimization

For more help, see the Getting Started Guide.

About

Transform messy social media exports into organized, searchable memories with embedded EXIF metadata

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages