Skip to main content

A digital helper to keep your files neat and tidy

Project description

pixe

flake8 pytest Code style: black

A digital helper to keep your files neat and tidy.

In its most basic invocation: pixe <directory with files> pixe will copy all JPG files from a source directory into a new set of subdirectories based on capture date. These files will also be renamed based on said capture date and a calculated SHA1 hash.

subdirectories

Subdirectories will be created, as needed, in the destination folder to match the creation date of the files being processed and will take the following form: YYYY/M

renamed files

Each file (whether moved or copied) will have a new name applied to it based on the following pattern: YYYYMMDD_hhmmss_<SHA1SUM>.jpg

The datetime info is taken from the image capture datetime. The SHA1SUM is calculated based on the image data only (does not include image metadata).

example

Given a directory of images, dirA which contains a few image files:

dirA
├── IMG_0001.jpg
├── IMG_0002.jpg
└── IMG_1234.jpg

Running pixe /path/to/dirA from within a second directory, dirB would result in the following directory structure:

dirB
├── 2021
│   └── 12
│       └── 20211225_062223_7d97e98f8af710c7e7fe703abc8f639e0ee507c4.jpg
└── 2022
    ├── 2
    │   └── 20220202_123101_447d306060631570b7713ea48e74103c68eab0a3.jpg
    └── 3
        └── 20220316_232122_321c7d6f5be8739a8974e4c3512e3226eb6704a7.jpg

Installation

$ pip install pixe

Usage

Usage: pixe [OPTIONS] SRC

Options:
  -d, --dest TEXT              desired destination
  -r, --recurse                recurse into sub-directories (default: off)
  --parallel / --serial        process files in parallel (default: --parallel)
  --move, --mv / --copy, --cp  move files into DEST rather than copying
                               (default: --copy)
  --owner TEXT                 add camera owner to exif tags
  --copyright TEXT             add copyright string to exif tags
  --help                       Show this message and exit.

Options

-d, --dest TEXT

The base directory of where you want the processed files to end up. If this option is not specified, the current working directory will be used.

-r, --recurse

pixe will recurse into any subdirectories it finds beneath SRC. The default is to not recurse.

--parallel / --serial

Should pixe process multiple files at once, in parallel using multiprocessing using all available cores. If --serial is chosen one file will be processed at a time. The default is to process files in parallel if there is more than one file specified for processing.

--move, --mv / --copy, --cp

By default, pixe will copy files into DEST and leave the source files untouched. This can be overridden by specifying --move.

--owner

A string which will be inserted into the CameraOwnerName EXIF tag [0xa430]

--copyright

A string which will be inserted into the Copyright EXIF tag [0x8298]

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

pixe-0.9.0.tar.gz (12.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pixe-0.9.0-py3-none-any.whl (15.6 kB view details)

Uploaded Python 3

File details

Details for the file pixe-0.9.0.tar.gz.

File metadata

  • Download URL: pixe-0.9.0.tar.gz
  • Upload date:
  • Size: 12.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.4

File hashes

Hashes for pixe-0.9.0.tar.gz
Algorithm Hash digest
SHA256 a3a4e90ff1bd71e294fc6fb0c14a0242f8a82308425923ea951f04307ab26fab
MD5 8a9f65b3be0bab9c2a1ee446d4c24a76
BLAKE2b-256 f001955f2384884cfcc7b9dc0277ef4c95a471c1404becced56b1349332d0ada

See more details on using hashes here.

File details

Details for the file pixe-0.9.0-py3-none-any.whl.

File metadata

  • Download URL: pixe-0.9.0-py3-none-any.whl
  • Upload date:
  • Size: 15.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.4

File hashes

Hashes for pixe-0.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 23149c72549d9112e47a1bc81b2566d03411578e14a9039e339fe28209f81fc9
MD5 d69cc6b1ec42455cdbe3b4189cc7b839
BLAKE2b-256 4d6b38f82c02f4f8547aa6d7e1d105a5fbdeffa28abe687f3ab7fe139579fad4

See more details on using hashes here.

Supported by

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