Skip to main content

Graphical tool to sort images into a folder structure based on the date the images were taken

Project description

Image Sorting Tool

Build Status PyPI version PyPI license
Screenshot This is a simple graphical tool to sort media into a structured folder. It is designed primarily for JPG images taken with a camera/phone but will also work with MP4, PNG and GIF media files. It works by finding all files in a chosen source directory (including sub-directories) and then based on the chosen sorting options, copies them into a structured destination.

The date-taken for JPG files is extracted from the EXIF data and for all other file formats the filename is used to extract the date-taken. The files destination name will be in format 'yyyymmdd-HHMMSS'. For example '20201225-234532.jpg' The default output structure is year and month folders. For example:

/
├── 2019/
    ├── 07/
        ├── 20190712-141507.jpg
        └── 20190719-224521.jpg
    └── 10/
        ├── 20191011-180520.jpg
        └── 20191029-204731.jpg
└── 2020/
    ├── 01/
        └── 20200114-135312.jpg
    └── 03/
        └── 20200301-110330.jpg

Files that cannot have the date-taken extracted (missing EXIF or bad filenames) will be copied to a 'failed_to_sort' folder in the root directory of the above structure without any renaming. These files are commonly ones downloaded from the internet or shared through social media.

If your source folder has other files such as binaries, documents, audio recordings, or music, you can choose if you want to ignore them or copy them to an 'other_files' folder with the 'Copy all other files' option.

This tool is multi-threaded to increase performance on high speed storage such as SSDs.

No data in the source directory is altered. It only reads from the source, and then copy operations are performed during the sorting process.

Installation

The tool can be run on Linux, MacOS and Windows provided the following requirements are met

Requirements

  • Python 3.6 or above
  • python3-tk (Comes with Python 3, but may need installing separately in linux)

To check what version of python is installed, open a console and run:

python --version

If the python version is suitable then run the following to install the image-sorting-tool

pip install image-sorting-tool

Usage

Run the following to launch

image-sorting-tool

Upgrading

Run the following to upgrade

pip install --upgrade image-sorting-tool

Uninstalling

Run the following to remove the tool from your machine

pip uninstall image-sorting-tool

Development

To contribute, clone this repo and then install the dev dependencies with

pip install -e .[dev]

Rerun the above pip install -e command after making code changes then launch with image-sorting-tool -vv for debug logs.

Automated checks

Linting and unit tests should be checked before committing by running the following:

# Code formatting
black  image-sorting-tool

# Linting
pylint image_sorting_tool

# Unit test on current environment python version
pytest

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

image-sorting-tool-0.2.0.tar.gz (12.0 kB view details)

Uploaded Source

Built Distribution

image_sorting_tool-0.2.0-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

Details for the file image-sorting-tool-0.2.0.tar.gz.

File metadata

  • Download URL: image-sorting-tool-0.2.0.tar.gz
  • Upload date:
  • Size: 12.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for image-sorting-tool-0.2.0.tar.gz
Algorithm Hash digest
SHA256 f4af2627aad1ada2d8870635faa672ddbb4be00b35f4e8c9cac00bac0130838e
MD5 3f1f20a11a18e023f6ae8b3eba592fa8
BLAKE2b-256 bc8a9fc129004d3db5cebfd86157544eedf3b2f7a6080358193759b268419297

See more details on using hashes here.

File details

Details for the file image_sorting_tool-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for image_sorting_tool-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 46d5e1f01d612acb46e2aae958f4d7efaf20fb35fb52390c4c570ad15d442bae
MD5 c8094202714a72f69dbcbac0cd713763
BLAKE2b-256 9a813d96822605a446d4cad2e5685b039e34dae9b533963f3675709be99da147

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page