Skip to main content
https://travis-ci.org/leinz/imagesort.svg?branch=master

Organize image files by date taken

All tiff and jpg images under the given source directory are placed in the destination directory under subdirectories with names corresponding to when they are taken. Files with no or invalid exif metadata are put in the unknown directory.

The destination directory have the following structure after processing:

2013/
    2013_12_20/
        1.jpg
2014/
    2014_03_06/
        2.jpg
        3.jpg
    2014_07_01/
        4.jpg
unknown/
    5.jpg

The original filenames are preserved. If a destination filepath already exist, there are two possible outcomes:

  • If the old filepath’s content is identical to the new one, the program does nothing and continues to the next image.

  • If the contents of the old and new files are different, it will append an integer until the content of an existing file matches or the path does not already exist. This means that if there are three source files named 1.jpg with identical date metadata but different contents, the final names will be 1.jpg, 1-1.jpg and 1-2.jpg.

Installation

Install with one of the following commands:

$ easy_install imagesort

or alternatively if you have pip installed:

$ pip install imagesort

Usage

Type imagesort -h for a list of available options.

Examples

Copy images from inputdir to outputdir:

$ imagesort copy inputdir outputdir

Use the dry-run flag to see which actions will be performed without actually doing anything:

$ imagesort --dry-run copy inputdir outputdir

Replace copy with move or hardlink to move or hardlink files instead of copying them.

Development

Testing

Running the tests during development requires pytest. Install dependencies with

$ pip install -r requirements.txt

and then run tests with

$ py.test

Alternatively, if you have tox installed, just run tests by running:

$ tox

Release files for imagesort 0.4.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 imagesort 0.4.0
File Size Uploaded
imagesort-0.4.0.tar.gz 4.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for imagesort 0.4.0
File Interpreter ABI Platform
imagesort-0.4.0-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 10.2 kB

Release files / imagesort-0.4.0.tar.gz

Download URL imagesort-0.4.0.tar.gz
Size 4.0 kB
Tags Source
SHA-256 checksum
How to use checksums
e2478853a6d4e2fffce9944107360077e70af4e324276d73f5a21e32e61e498c
BLAKE2b-256 checksum
How to use checksums
70ca7b200480bd777b271044683f4fd4c2f0462c86b63548f473114fb591bc42
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / imagesort-0.4.0-py2.py3-none-any.whl

Download URL imagesort-0.4.0-py2.py3-none-any.whl
Size 6.2 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
5a6fc99cd7672a835bb10ffdaa734e37e22a0ec1578b8e9a46ced9b49b165720
BLAKE2b-256 checksum
How to use checksums
fd6312cff99f7b11109545d9d12e663e0b738fc677266087a33e6c34ec413aab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files

0.3.0

2 release files

0.2.0

1 release file

0.1.1

1 release file

0.1.0

1 release file

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