Ruby: Extracting ACDSee Metadata

So I’ve recently taken to using the Ruby programming language for writing utility scripts, not for any practical purpose, but because the language looks interesting and I want to try it out. I feel like this utility script might be useful to someone else, so I decided to publish it. It’s a script that extracts embedded and sidecar ACDSee metadata from images – keywords in this case – and stores it in an easy-to-use hash.

First, you’ll need to download exiftool and install mini_exiftool, the Ruby gem that interfaces with it, with gem install mini_exiftool. mini_exiftool should pick up exiftool’s executable if you have it in your path, but it’s easier to specify the path to the executable manually with

Once that’s done, we can get cracking. Here is the code I use, annotated:

Hope this helps someone. By itself, this doesn’t do anything WITH the tags (I personally used it to build SQL queries), but it’ll get you started. There’s also plenty of ways to improve it, including more fool-proof extracting of keywords from xmp files and command-line arguments, but that’s left as an exercise to the reader 🙂

Published by



Developer, linguistics enthusiast, amateur teacher. All opinions are my own.

Leave a Reply

Your email address will not be published. Required fields are marked *