Skip to main content

Utility to remove unprocessed RAW files from a folder keeping only RAW files that yielded results

Project description

Overview

For photographers keeping every raw file captured can use a lot of space.
This utility allows a photographer to purge any unused raw files leaving only the processed files with their associated raws.

The app trawls the input directory for raw and processed images. Where it finds a raw image with a numeric index that can't be found in the processed images it is marked for removal.

Any sequence of 3 to 6 (inc) numbers in the image filename is deemed as its index which is used to associate processed and raw images.

Processed images may also have a filename format with a range of indexes, e.g. IMG_01234-1236.jpg This processed file would be associated with IMG_01234.cr3, IMG_01235.cr3 and IMG_01236.cr3 raw images thus ensuring they are not deleted. This is useful for HDR or panoramic processed images.

For example, given the folder1 below:

folder1/
  IMG_1000.cr3
  IMG_1001.cr3
  IMG_1002.cr3
  IMG_1003.cr3
  IMG_1004.cr3
  Processed/
    IMG_1000.jpg
    IMG_1002-1003.jpg

Running praw folder1 -d would remove the IMG_1001.cr3 and IMG_1004.cr3 raw images as they don't have associated processed images.

The resulting directory would be left as:

folder1/
  IMG_1000.cr3
  IMG_1002.cr3
  IMG_1003.cr3
  Processed/
    IMG_1000.jpg
    IMG_1002-1003.jpg

To install run pip install purgeraw

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

PurgeRaw-1.0.5.tar.gz (4.5 kB view hashes)

Uploaded Source

Built Distribution

PurgeRaw-1.0.5-py3-none-any.whl (5.8 kB view hashes)

Uploaded Python 3

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