Skip to main content

Image Sorting Tool

Python Checks PyPI version 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 (compatible versions are listed at top of readme)
  • python3-tk (Comes with Python 3, but may need installing separately in linux)
  • pipx (highly recommended, but pip will also work)

It is recommended to install image-sorting-tool with pipx as it will manage a dedicated environment and all paths for you, eliminating risk of dependency conflicts, etc.

To install run the following

pipx install image-sorting-tool

Usage

Run the following to launch

image-sorting-tool

Upgrading

Run the following to upgrade

pipx upgrade image-sorting-tool

Uninstalling

Run the following to remove the tool from your machine

pipx uninstall image-sorting-tool

Development

To contribute, clone this repo and then install the dev dependencies. Note that this project requires the system's tkinter library, so uv must be configured to use the system Python interpreter instead of its isolated builds.

# Create a virtual environment using the system Python
uv venv --python python

# Installs package locally so code changes will affect behaviour
uv sync --python python

#Launch with -vv flag for debug logs
uv run --python python image-sorting-tool -vv

Automated checks

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

# Code formatting
uvx ruff format

# Linting
uvx ruff check --fix

# Unit test on current environment python version with coverage
uv run --python python pytest --cov=image_sorting_tool

Metadata

Release files for image-sorting-tool 1.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for image-sorting-tool 1.3.0
File Size Uploaded Provenance Actions
image_sorting_tool-1.3.0.tar.gz 5.3 MB Without provenance Details for image_sorting_tool-1.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for image-sorting-tool 1.3.0
File Interpreter ABI Platform Actions
image_sorting_tool-1.3.0-py3-none-any.whl Python 3 none any Details for image_sorting_tool-1.3.0-py3-none-any.whl

Total release size: 5.3 MB

Release files / image_sorting_tool-1.3.0.tar.gz

Download URL image_sorting_tool-1.3.0.tar.gz
Size 5.3 MB
Tags Source
SHA-256 checksum
How to use checksums
f554e09ff696de706ef04520f3d1ec1f492718bf0e6589bfe85601202d8c970e
BLAKE2b-256 checksum
How to use checksums
a0d6707b968ef8294ada604e3e2fb9b3bf398c2086a11769b0bf370d10644a45
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release files / image_sorting_tool-1.3.0-py3-none-any.whl

Download URL image_sorting_tool-1.3.0-py3-none-any.whl
Size 14.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b96adf9476a63c3e2decb767600642da8401f7136e19e7c66081716efb52a603
BLAKE2b-256 checksum
How to use checksums
ee4620d9b6f1539696a850b5cb9d5304ec161f8eb0d8701e5d5f4245c782833e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Security for image-sorting-tool 1.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page