Skip to main content

PhotoSort Project

Unit/Functional testing

What is PhotoSort?

PhotoSort simplifies your photo inbox, it watches for a set of photo input directories, to catalog and move into a predefined storage, it can delete the input or keep it.

It does take care of duplicate files, if there is a duplicate in a it will be moved to the duplicates directory

Easy install

pip3 install photosort

PhotoSort depends on exiftool, please install exiftool in your system.

Alternate install method

git clone https://github.com/mangelajo/photosort
cd photosort
sudo python3 setup.py install

How to use it

Create a config file in /etc/photosort.yml or anywhere else and use the --config parameter.

Then run:

photosort rebuilddb # only for the first time

photosort sync # to sync new files in

or

photosort monitor # to keep it running and watching for new files

The database

It's a plain textfile for now, I want to be able to remove or edit entries by hand if needed, at least on early stages of the project.

In the future this must be an sqlite file.

Dependencies

photosort depends on exiftool to identify the original creation time of videos or pictures.

Configuration

Configuration is stored in YAML format

Don't create the field 'file_prefix' if no change is desired in the filename of the media items.

This is an example file:

sources:
  dropbox:
    dir: '/Users/ajo/Dropbox/Camera Uploads'
  nasinbox:
    dir: '/mnt/nas/Pictures/inbox'


output:
  dir: '/mnt/nas/Pictures'
  dir_pattern: "%(year)d/%(year)04d_%(month)02d_%(day)02d"
  file_prefix: "%(year)d%(month)02d%(day)02d%(hour)02d%(minute)02d%(second)02d_"
  duplicates_dir: 'duplicates'
  chmod: 0o774
  log_file: 'photosort.log'
  db_file: 'photosort.db'

Release Notes

2021.1.4

  • PIL image library has been replaced for exiftool so datetime from videos can be obtained too.
  • Files with no creation datetime EXIF or tags are ignored for now.

Release files for photosort 2024.1.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 photosort 2024.1.0
File Size Uploaded
photosort-2024.1.0.tar.gz 12.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for photosort 2024.1.0
File Interpreter ABI Platform
photosort-2024.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 17.7 MB

Release files / photosort-2024.1.0.tar.gz

Download URL photosort-2024.1.0.tar.gz
Size 12.9 kB
Tags Source
SHA-256 checksum
How to use checksums
e893c67d2545ece479c5e043abf6e0acfe08f9b7f8bb095781a6731a559285f6
BLAKE2b-256 checksum
How to use checksums
ac5917eb392a785193576b89517bd458f9822bbb16ce3c18b6f0c5873fd77e5b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.4

Release files / photosort-2024.1.0-py3-none-any.whl

Download URL photosort-2024.1.0-py3-none-any.whl
Size 17.7 MB
Tags Python 3
SHA-256 checksum
How to use checksums
a205c7e4ffe9ab40c558f96d5f3a66a08d33bfc11859630130327c9f0999768c
BLAKE2b-256 checksum
How to use checksums
d0cc43e64b438fb47c307ce0b85f7cae85635b02a587eca7f4123e4b81e4e79a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.9.16

Release history Release notifications | RSS feed

This release

2024.1.0 This release

2 release files

2020.1

1 release file

2018.3

1 release file

2018.2

1 release file

2018.1

1 release file

2015.2

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