The Ideas

Tell, Don’t Show (Command Line!)

GUI are hard; GUIs for juggling thousands and thousands of files even more so. Yet if we separate the pure management of photos from their display, and rely on the trusted command line, we can leverage a host of not only excellent, but industry-leading tools like the unparalleled exiftool or the venerable rsync to surf our photo tsunami.

Play (REPL!)

Now, bare-bone scripting, e.g., in bash, works in theory, but is tricky in practice if you need to account for special cases and error handling. A script running “blindly” over a bunch of files can easily wreak havoc, skip (quite unnoticed) over edge cases if not explicitly accounted for beforehand, and generally be somewhat tedious to work with, as intermediate steps must usually be recorded in some temporary file or other.

A useful frame to work in is a so-called REPL, or Read-Eval-Print-Loop. It is an interactive command line shell that allows you to easily play with things like lists, strings, variables and files. It lets you view and transform them. It lets you define new functions and execute them—and all the while, intermediate results are still handily available at your fingertips.

Many programming languages like Python or Haskell feature such a REPL. In fact, you can immediately try it out if you haven’t heard this concept. Run

$ python3
>>> 1+1
2

You just used Python’s REPL as a calculator! Now what if you could use such a REPL to explore and filter your photos?

Here’s where the Julia language comes in. It has an outstanding REPL, and Exifuse sort of lives in it. Exifuse exposes some custom functions, but you can also use the vast number of other Julia packages to tune your file management solutions.

Last but not least: the Julia REPL has excellent support for tab completion, which comes in very handy with those innumerable EXIF tags!

Combine (LEGO!)

Just like ordinary Unix tools, the Exifuse primitives are meant to be interactively combined and tailored to your needs. I am no photographer myself, and could not possible envision the concrete problems you face in your photo workflow. Hopefully, the composability of Exifuse and Julia functions can help you.

Julia as the host language is especially well-suited to this task. It can be used as a mere scripting language—but it can also be operated in a stricter, type-safe way. For example, using Exifuse’s so-called FileEntry type can ensure that each instance points to an actually existing file. Function that operate on this type are thus automatically ensured to never operate on non-existent files.

Julia’s REPL also provides the very neat command pipelines with the operator |>. This lets you compose very naturally-looking command patterns and data/file workflows.

No File Left Behind (Be Pedantic!)

When dealing with tons of files, it’s fairly easy to either skip over or to falsely include some files—maybe by skipping symbolic links, by having to deal with the pesky .DS_Store files, or by crafting an almost-correct regular expression for a large grep, etc. Some tools will quite liberally sprinkle new metadata files all over the place; other tools, well,Photos on macOS, will try to do you a favor by counting a jpg+cr2 file duo as one photo (making quick sanity checks on file numbers virtually impossible).

Exifuse does not create metadata files. It does not create a central photo database. It tackles each and every files, and lets you filter them as you want. It tries to never run approximately right, and to fail at the earliest possible moment—if at all possible, before any large-scale file operation, and never in its middle.