Skip to content
Photo/video organizing gem to put media files in folders by year/month/day (exif data, or ctime)
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin
lib
Gemfile
Gemfile.lock
LICENSE
README.md
photo_organizer-0.1.0.gem
photo_organizer-0.2.0.gem
photo_organizer-0.3.0.gem
photo_organizer-0.3.1.gem
photo_organizer-0.4.0.gem
photo_organizer-0.4.1.gem
photo_organizer-0.5.0.gem
photo_organizer-0.6.0.gem
photo_organizer.gemspec

README.md

Photo Organizer Gem

Usage

As a standalone executable:

$ photo_organizer ~/src_directory ~/dest_directory

Processing directory /Users/carl/src_directory
Processing 2013-12-04 08.24.39.jpg to 2013-12-04 08.24.39.jpg...
  Moved to /Users/carl/dest_directory/2013/12/04/2013-12-04 08.24.39.jpg
Processing Photo Dec 02, 7 19 02 PM.jpg to 2013-12-02 19.19.02.jpg...
  Moved to /Users/carl/dest_directory/2013/12/02/2013-12-02 19.19.02.jpg
Processing Photo Dec 03, 4 00 54 PM.png to 2013-12-04 22.28.33.png...
  Moved to /Users/carl/dest_directory/2013/12/04/2013-12-04 22.28.33.png
Processing Photo Dec 03, 4 01 12 PM.png to 2013-12-04 22.28.33.png...
  Moved to /Users/carl/dest_directory/2013/12/04/2013-12-04 22.28.33.png
Processing Photo Dec 04, 2 32 21 PM.jpg to 2013-12-04 14.32.21.jpg...
  Moved to /Users/carl/dest_directory/2013/12/04/2013-12-04 14.32.21.jpg

As part of an OSX launch agent:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
  <key>Label</key>
  <string>com.carl.dropbox.organizer</string>
  
  <key>ProgramArguments</key>
  <array>
  	<string>/Users/carl/.rbenv/shims/photo_organizer</string>
    <string>/Users/carl/Dropbox/Camera Uploads</string>
    <string>/Users/carl/Dropbox/Photos</string>
  </array>
  
  <key>RunAtLoad</key>
  <true/>
  
  <key>StartInterval</key>
  <integer>60</integer>
  
  <key>WatchPaths</key>
  <array>
    <string>/Users/carl/Dropbox/Camera Uploads</string>
  </array>
  
  <key>StandardOutPath</key>
  <string>/tmp/dropbox.out.log</string>
  
  <key>StandardErrorPath</key>
  <string>/tmp/dropbox.error.log</string>
</dict>
</plist>

Configuration

You can configure things by creating a '.photo_organizer' file and placing it in your home directory (~).

This configuration will set the folder format to be year/month versus the default of year/month/day.

format: "%Y/%m"

See strftime for details on other time elements you can include.

You can’t perform that action at this time.