Skip to main content

Phorganize is a python script to organize photos and videos using embedded meta data in the files.

Project description

Phorganize

License

Overview

Phorganize is a python script to organize photos and videos using embedded meta data in the files. It can move files to sub-directories, rename files, and make sub-directories with camera model if you specify the options. It runs on macOS.

Table of Contents

Installation

Just add tap and install homebrew package.

brew tap rioriost/phorganize
brew install phorganize

Usage

Execute phorganize command.

phorganize --help
usage: phorganize [-h] [--verbose] [--move] [--rename] [--recursive] [--camera] [--output OUTPUT] [--lower] [--upper] [--dryrun] [--tzdelta TZDELTA] input

Organize photos and videos using embedded meta data in the files

positional arguments:
  input                 Input path of photos and videos or directory to find them

options:
  -h, --help            show this help message and exit
  --verbose, -v         increase output verbosity
  --move, -m            (M)ove files to sub-directories, not copy
  --rename, -r          (R)ename files, NOT maintain original name
  --recursive           Find files recursively within input directory
  --camera, -c          make sub-directories with (C)amera model
  --output OUTPUT, -o OUTPUT
                        Path of a directory to save files
  --lower, -l           (L)ower cased file extension, e.g. '.jpg'
  --upper, -u           (U)pper cased file extension, e.g. '.JPG'
  --dryrun, -d          Only print what the program will do
  --tzdelta TZDELTA     Timezone delta where photos/videos taken in. e.g. '+9'

The indentical usage is shown below.

e.g. a directory named 'photos' contains photos and videos.

tree ~/Desktop/photos
/Users/rifujita/Desktop/photos
├── 125A9549.MP4
├── 125A9550.CR3
├── 125A9551.CR3
├── 125A9552.CR3
├── 125A9553.CR3
├── 125A9657.CR3
├── 125A9658.CR3
├── 125A9724.MP4
├── 125A9725.CR3
├── 125A9730.CR3
├── 20160507120409.CR2
├── 20210710173257.dng
├── 20220627170828.CR2
├── 20220627170829.CR2
├── 2023120110.MP4
├── IMG_9873.HEIC
├── IMG_9874.HEIC
└── IMG_9875.HEIC

1 directory, 18 files
phorganize -r -c -m ~/Desktop/photos
Processing files in /Users/rifujita/Desktop/photos...
Done.
  • -r: Rename files, NOT maintain original name. Renaming is a little bit dangerous, so PLEASE USE IT CAREFULLY.
  • -m: Move files to sub-directories, not copy
  • -c: Make sub-directories with camera model

After phorganize is executed, the directory 'photos' is organized as shown below.

tree ~/Desktop/photos
/Users/rifujita/Desktop/photos
├── 2016   └── 05       └── 07           └── Canon PowerShot S120
│               └── 20160507120409.CR2
├── 2021   └── 07       └── 10           └── iPhone 11 Pro
│               └── 20210710173257.dng
├── 2022   └── 06       └── 27           └── Canon EOS 5D Mark III
│               ├── 20220627170828.CR2
│               └── 20220627170829.CR2
├── 2023   └── 12       └── 01           └── (null)               └── 20231201101539.MP4
└── 2025
    └── 02
        └── 06
            ├── (null)
               ├── 20250206181442.MP4
               └── 20250206185300.MP4
            ├── Canon EOS R6m2
               ├── 20250206181616-1.CR3
               ├── 20250206181616-2.CR3
               ├── 20250206181616-3.CR3
               ├── 20250206181616-4.CR3
               ├── 20250206183628-1.CR3
               ├── 20250206183628-2.CR3
               ├── 20250206185925-1.CR3
               └── 20250206185925-2.CR3
            └── iPhone 16 Pro
                ├── 20250206180947-1.HEIC
                ├── 20250206180947-2.HEIC
                └── 20250206180948.HEIC

23 directories, 18 files

If multiple files will have the same new name, phorganize will add a sequence number to the file name. Movie files do not have camera model information, so they are organized in the '(null)' directory.

Release Notes

0.1.1 Release

  • Fixed a title of README.md

0.1.0 Release

  • First release.

License

MIT License

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

phorganize-0.1.2.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

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

phorganize-0.1.2-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file phorganize-0.1.2.tar.gz.

File metadata

  • Download URL: phorganize-0.1.2.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.27

File hashes

Hashes for phorganize-0.1.2.tar.gz
Algorithm Hash digest
SHA256 3465bbb140e146ebc98a0bea004def2611f3abf84251a9465cc1388d7b624e76
MD5 54fa987ca8c93cd298e7c96d8f2d21a6
BLAKE2b-256 4724f5578804ef253b18a1006c68e7c4ba9638ee7ee72cef2e035700cdb29add

See more details on using hashes here.

File details

Details for the file phorganize-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: phorganize-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 8.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.27

File hashes

Hashes for phorganize-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 96d5658df09db8a0c0c10e5dbc9603447263cc94d7e88ff1621b2aebe2a13c25
MD5 a1cdbd7b85d065391dd4bed0074a649b
BLAKE2b-256 6d685db3d3d03bbdbdb5293829c1a9eecc97daee3310b7d15bc3349288f20481

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