Skip to content

ExifTimestamp is a Python tool for updating EXIF timestamps in JPEG images, ensuring accurate metadata for proper organization in services like Amazon Photos.

License

Notifications You must be signed in to change notification settings

sya-ri/ExifTimestamp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

ExifTimestamp

ExifTimestamp is a Python tool designed to update the EXIF timestamp of JPEG images. By ensuring accurate timestamps in the EXIF metadata, this tool helps you correctly organize and store your images in services like Amazon Photos.

Features

  • Automatically reads the folder structure to derive image dates.
  • Updates EXIF timestamps based on the folder’s year and month-day structure.
  • Supports recursive processing of nested folders.
  • Simple and lightweight, leveraging piexif for EXIF operations.

Why Use ExifTimestamp?

Amazon Photos and similar services often rely on EXIF timestamps to organize images by date. If the EXIF metadata is missing or incorrect, your photos may be displayed out of order. ExifTimestamp ensures that your photos are organized properly by aligning their timestamps with your folder structure.

Prerequisites

  • Python
  • Pip installed on your system

Installation

  1. Clone the repository:
    git clone https://github.com/sya-ri/ExifTimestamp
    cd ExifTimestamp
  2. Install the required Python library:
    pip install -r requirements.txt

Usage

  1. Prepare your image folders with the following structure:

    <base_directory>
    ├─2023
    │   ├─1005
    │   └─1006
    ├─2024
    │   ├─0217
    │   └─0930
    

    Here, 2023/1005 represents October 5, 2023.

  2. Run the script:

    python main.py
  3. Enter the base directory when prompted:

    Enter the base directory path: /path/to/your/base_directory
    

The script will automatically process all JPEG files within the folders and update their EXIF timestamps.

Example Output

Enter the base directory path: C:\Users\User\Pictures
Starting to update EXIF timestamps in C:\Users\User\Pictures
Processing folder: C:\Users\User\Pictures\2023\1005, Base date: 2023-10-05 00:00:00
Updated C:\Users\User\Pictures\2023\1005\IMG_001.JPG -> 2023:10:05 00:00:00
Updated C:\Users\User\Pictures\2023\1005\IMG_002.JPG -> 2023:10:05 00:00:01
All EXIF timestamps updated successfully!

Limitations

  • Only works with JPEG files (.jpg, .jpeg).
  • Assumes the folder names follow the YYYY/MMDD pattern.
  • Overwrites existing EXIF timestamps; ensure you have backups.

License

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

Contributing

Contributions are welcome! Feel free to open issues or submit pull requests to enhance the functionality.

Acknowledgments

  • This project uses the piexif library for EXIF metadata manipulation.

About

ExifTimestamp is a Python tool for updating EXIF timestamps in JPEG images, ensuring accurate metadata for proper organization in services like Amazon Photos.

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

  •  

Languages