- Tired of messy photo libraries? AutoPhotoSort is a simple Python tool designed to automatically organize your photos into folders based on the year and month they are taken.
- Supported formats = '.jpg', '.jpeg', '.png', '.nef', '.mov', '.mp4', '.avi'
AutoPhotoSort/
├── data/
│ ├── input/
│ └── output/
├── src/
│ ├── AutoPhotoSortLogo.png
│ └── sorter.py
├── autophotosort.py
├── autophotosort_gui.py
├── AutoPhotoSort start.bat
├── README.md
└── requirements.txt
- Pillow (PIL): For image processing and EXIF data extraction.
You can install the dependencies using pip:
pip install -r requirements.txt
-
Installation:
Open your terminal in the
AutoPhotoSort
project directory. Run the following command to install the necessary Python library:pip install -r requirements.txt
-
Prepare Your Photos:
Place the photos you wish to organize into the
data/input
directory within the project folder. -
Run the AutoPhotoSort Script:
In the same terminal, execute the
autophotosort.py
script:python autophotosort.py
-
Find Your Sorted Photos:
Once the script finishes, your photos will be sorted into folders by year and month within the
data/output
directory. For example, photos taken in November 2024 will be in a folder named2024 November
.
This project now includes a graphical user interface (GUI) for easier interaction.
-
Run the
AutoPhotoSort start.bat
script: Simply double-click theAutoPhotoSort start.bat
file in the project directory.- This script will automatically check if Python is installed and guide you to install it if necessary.
- It will also install the required Python libraries from
requirements.txt
. - Finally, it will launch the
autophotosort_gui.py
application.
-
Using the GUI:
- The GUI provides buttons to open and select input and output folders. By default, it is set to
data/input
anddata/output
folders in the project directory. - Click "Start Sorting" to begin organizing your photos.
- The GUI provides buttons to open and select input and output folders. By default, it is set to
src/sorter.py
: Contains the core logic for reading EXIF metadata from images and sorting photos into directories.autophotosort.py
: The main script that sets up input and output directories and calls the photo sorting function for command line interface.autophotosort_gui.py
: Implements the graphical user interface using Tkinter, providing an easier way to interact with the photo sorting tool.AutoPhotoSort start.bat
: A batch script that simplifies running the GUI application by checking for Python, installing dependencies, and launchingautophotosort_gui.py
.
- Add command-line arguments for input and output directories.
- Implement error handling and logging.
- Add support for more image formats and metadata types.