Printing 2 of X: Renaming (a lot of) Color Profiles on the Mac

Previous post in this series                                                                            Next post in this series

bash.jpg

With paper comes profiles.  With sample packs of paper come LOTS of profiles.  Profiles which invariably have unpleasant names, like "HFAPhoto_CanPro1000_PK_HahnemuehlePhotoSilkBaryta310" which neither rolls trippingly off the tongue nor makes it easy to pick "Hahnemuehle Fine Art Photo Silk Baryta 310 for the Canon PRO-1000" off of a menu.

Renaming the files is easy using Better Finder Rename, a mac utility I've been using for at least a decade.  It brings a step-by-step interface to simple and complex renaming of multiple files.  Well worth it.

But renaming the profiles isn't as simple as renaming the files.  ColorSync utility will let you do it, and there is a script provided to do the renames, but renaming dozens of profiles at once is a pain.  To use ColorSync directly, just double-click on the profile file, and then in ColorSync click on the 'dscm' Apple multi-localized description strings field if present and edit it, or click on the 'desc' field and edit it.  So far as I can tell, the 'dscm' field will take priority if it is present.  If you prefer, there is a 'Rename' script in the 'ColorSync' portion of the menubar script menu, which you turn on using the 'Preferences...' menu item of the 'Script Editor' app in the Utilities folder of the Applications folder.  But using either to rename a bunch of profiles remains a big pain.

So I wrote a shell script which renames profiles to their base filename.  It's crude and simple, and will probably break for other people, but here it is:

#!/bin/bash

for file in ./H*
do
    BASENAME="sips -s description '$(basename -s .icc $file)' '$file' "
    echo 'executing $BASENAME...'
    eval $BASENAME
done

Hope someone finds it useful.

I rename the files to roughly PaperManufacturer PaperName PaperWeight BlackType Printer, e.g. "Hahn Photo Pearl PK Canon PRO-1000" which still isn't a brilliant name to sing out at night, but at least tells me what I'm looking at.

 

(Originally posted to my personal blog @ Mischievous Ramblings II)