Skip to content

This repository is for a final project in COP 1500 (Computer Science Principles). I am designing a python script that takes photos in a dedicated source folder and organizes them by their creation dates into an output folder. (For jpeg/jpg and png file types)

License

Notifications You must be signed in to change notification settings

LandonTrev/PhotoOrganizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 

Repository files navigation

Photo Organizing Script

This is a script I designed to automatically sort photos based on their creation date extracted from EXIF metadata. It scans a source folder containing photos and organizes them into seperate folders based on the date they were taken. It then moves the organized folders into a destination folder. As of now it is only capable of sorting .jpeg .jpg and .png file types. This is very practical if you have loads of pictures on an sd card or your phone. Instead of just backing them up you can organize them so they are easier to look back at.

Getting Started

Follow these instructions to help you set up the script on you computer for testing or further development.

Prerequisites

  • Python 3.x
  • pip
  • Pillow external library

How to install and use

  1. Start of by ensuring you have the package manager [pip] installed on your computer. (https://pip.pypa.io/en/stable/installation/)

  2. Install Pillow if you havent already by running 'pip install pillow' in your preffered terminal

  3. Clone the repository or download the script 'photo-organizer.py'

  4. Configure paths: Edit the 'local path' variable to specify the path to your source folder containing photos. Edit the 'destinationPath' variable to specify the path to the folder where sorted photos will be moved.

    carbon (3)

  5. Run the script by giving your terminal the command 'python photo-organizer.py' or simply double click the python file only after you've specified the paths. Make sure if using the terminal you specify the path the file is in. To do this you would run 'cd (specify the directory of .py file)' then proceed to type in the command to run it.

Testing

I've done quite a bit of testing with this project so far. I had an issue with the paths when not using r before the path to indicate a raw string. The backslashes in the windows paths were creating errors. I fixed this up and it works like a charm. I've tested it with hundreds of photos and it finishes in a few seconds. I've also made sure to try and put mp4, mov, and heic files within to make sure it skips over the files it cannot process. This ensures the script continues running even when there are file types it doesnt recognize.

Built With

  • Python- 3.12.2
  • Pillow- Python Imaging Library for image processing

Contributing

Contributions are Welcome! If you find any issues or have suggestions for improvments, I'm all ears. Feel free to open an issue or submit a pull request.

Road Map

There are a few more things I'd like to implement into this code in the future.

  • I want to incude .mov, .mp4, and .heic file formats and have the script sort these as well. The metadata structures are different in these formats which is why I havent yet. I would have to implement pyheif and moviepy librarys in order for this to work i believe.
  • I also plan on integrating an interactable gui that lets you browse for your source and destination folders instead of having to edit the local and destination paths of the script

License

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

Acknowledgements

About

This repository is for a final project in COP 1500 (Computer Science Principles). I am designing a python script that takes photos in a dedicated source folder and organizes them by their creation dates into an output folder. (For jpeg/jpg and png file types)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages