exisort

command module
v0.0.0-...-4f56ede Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 2, 2026 License: MIT Imports: 20 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Exisort

The safe, high-performance photo organizer.

Exisort is a command-line tool written in Go designed to tame chaotic photo collections. It imports photos and videos from SD cards or messy directories, organizes them into a clean folder structure based on EXIF metadata, and intelligently handles duplicates.

Unlike simple scripts, Exisort calculates content hashes to distinguish between a "duplicate file" and a "different photo taken at the same second," ensuring you never lose data.

Features

  • Smart Import: organizing by Date or custom patterns.
  • Collision Detection: Automatically handles filename collisions. If Img_01.jpg exists, Exisort checks the content. If it's the same file, it skips it. If it's different, it renames the new one automatically.
  • Metadata Fallback: Uses the best available capture date and falls back to the file modification time when metadata is missing.
  • Video Support: Handles .mov, .mp4, and other formats natively or via ExifTool fallback.

Usage

exisort [flags] <source_dir> <destination_dir>
Examples

1. Basic Import (Copy)

Safely copy photos from an SD card to your library, organized by year and month.

exisort /Volumes/EOS_DIGITAL ~/Photos

2. Move and Sort

Move files (delete from source after successful transfer) and use a custom naming format.

exisort --move --format "{year}/{month}/{year}-{month}-{day}_{hour}{min}{sec}.{ext}" /Downloads/Unsorted ~/Photos

3. Simulate (Dry Run)

See exactly what would happen without moving any files.

exisort --dry-run --move /Volumes/SD ~/Photos

Configuration

Core Flags
  • --move: Move files instead of copying them. Deletes the source only after a successful transfer.
  • --dry-run: Print actions that would be performed without making changes.
  • -v: Enable verbose logging (shows skipped files and details).
  • --min-size <KB>: Skip files smaller than this size. Default: 32.
  • --since <RFC3339>: Skip files whose modification time is older than the given timestamp.
Naming & Organization
  • --format <string>
    • Defines the destination folder structure and filename.
    • Default: {year}/{year}-{month}/{year}{month}{day}_{hour}{min}{sec}.{ext}
    • Tokens:
      • {year}, {month}, {day}: Date components.
      • {hour}, {min}, {sec}: Time components.
      • {filename}: Original filename (excluding extension).
      • {ext}: File extension.
Conflict Handling

What happens if the destination file already exists?

  • --conflict <mode>

    • rename (Default): Calculate hash. If content matches, treat as duplicate (skip/delete source). If content differs, append the short hash or a counter to the filename.
    • skip: Do not process the file if a file with the same name exists (regardless of content).
    • overwrite: Replace the destination file with the source file (Use with caution).
  • --deep: Perform a full SHA-256 hash comparison when checking for duplicates.

    • By default, Exisort uses a fast "Header + Size" fingerprint (CRC64 of the first 64KB) to detect duplicates. Use --deep when a full-file comparison is preferable.
Filtering
  • --extensions <list>: Comma-separated list of extensions to process.
    • Default: jpg,jpeg,png,heic,heif,mov,mp4,m4v,avi,arw,cr2,cr3,dng,nef,orf,raf,rw2

Installation

go install github.com/levmv/exisort@latest

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址