Speeding Up Captioning

From CameraBits
Jump to: navigation, search

Captioning photos is a very worthwhile and even essential task for making your photos more valuable. But it can be time consuming. Good use of the IPTC Stationery Pad to create captions that have common information is a way to speed up this process. Photo Mechanic offers two other features that can help you speed up your captioning. The first feature is called Code Replacement and the second feature is called Autocomplete.

Code Replacement

Note: This information covers Photo Mechanic 5. To see documentation for Photo Mechanic 6, go to docs.camerabits.com

Code Replacement is a feature which speeds up captioning of often-used terms or names like those used in sports photography, but can be used as a method of shorthand for any type of photography.

To use Code Replacement, you must prepare a UTF-8 text file in 'tab-separated format. You can use any text editor to generate the text file. The format of the text file is simple. It is comprised of two or more ‘columns’, the first being the ‘Code’ and the second through last being the ‘Replacements’. These ‘columns’ are separated by a ‘tab’ character. Using just spaces won't work. Ideally, you want your codes to be as short as possible while being completely unique.

Here's a simple example Code Replacement text file used for Basketball (Detroit Dunkers and Chattanooga Choo-Choos):

CC8	Dain Bramage
CC17	Rick Perkins
CC43	Brian Calloway
CC13	Dennis George
CC11	Darrin Green
CC2	Aaron Barnum
DD41	Stanislav Zarubezhanin
DD43	Paul Kroyd
DD24	Ken Pierce
DD44	Brian Socoletto
DD55	Wally Flannenbaum
DD13	Victor Zenfliende

Some of the player’s names are difficult to spell correctly, even if you are familiar with them. Code Replacement makes this problem a thing of the past. All you have to do is get the spelling right once: during the creation of the Code Replacement text file. Once you have created your text file, you need to tell Photo Mechanic to use it for Code Replacement.

Edit > Settings > Set Code Replacements
Code Replacement2.jpg

This is where you can define which files contain Code replacement data - and there can be more than one. You select multiple Code Replacement files at once in the file selection dialog by holding down the Shift key. Where multiple codes exist, the most recently loaded replacement will take preference. The "delimiter" field is the keyboard character you will use to tell Photo Mechanic to do a Code Replacement. The default character is a \, but you may wish to change this. For example, the \ can cause problems if you use Code Replacements in folder paths in Windows. Consider using something like = in those cases.

Once your text files are loaded, you can use ‘Code Replacement’ to speed up your captioning.

Continuing our basketball example, lets say you shoot a game where the Chattanooga Choo-Choos play the Detroit Dunkers. Later after Ingesting your images you begin to individually caption the keepers and want to identify the players in each of the photos.

Example: you have a picture with Dain Bramage (CC8) breaking past Stanislav Zarubezhanin (DD41) and you can visibly see their jersey numbers in the thumbnail preview of the IPTC Info dialog. You just type in your codes for each player, surrounded by the ‘\’ character which tells Photo Mechanic to look up the codes and enter their replacements. Photo Mechanic instantly looks up the replacement text and enters it in place of the \code\ and automatically places the cursor at the end of the replacement so that you can continue typing in the rest of your text.

Code Replacement Exmp.jpg

Code Replacement can help make your captions more accurate and can save time as well: just choose a system of mnemonics to help you remember your codes and the pictures themselves will help you derive the codes. In our example we chose CC as an abbreviation for the ‘Chattanooga Choo-Choos’ and DD as an abbreviation for the ‘Detroit Dunkers’. When captioning, we can see that the two players are on the Choo-Choos and the Dunkers, so we can derive the codes from their jersey numbers (8 and 41), giving us CC8 and DD41.

Multiple Code Replacement

Code Replacement also supports multiple replacements for a code. The additional replacements just follow the first replacement with a tab character between each additional replacement. Here is an example:

code	replacement	replacement #2 replacement #3

In order to use the alternate replacements you need to add the field selector which is the pound sign ‘#’ followed by the number of the replacement you want to select. For instance with the above example one would use \code#2\ to select the second replacement which would result in ‘replacement #2’ being entered in the text. While you can enter #1 to get the first replacement, it is not necessary. Code Replacement will work with either method.

Comments are also supported and must either start at the beginning of a line or be the last column on a line. Comments start with two forward slashes like so:

// this is a comment for the whole line
code	replacement	// this is a comment for the rest of the line

Code Replacement with Variables

Code Replacement can be paired with the use of variables to add indirection to the look up of a replacement for a code. For instance if you wanted to use the variable {monthname} but you wanted it to be translated to a different language from English, say Spanish, you could create a Code Replacement file that looks like this: (Note, there is one TAB between items in each column)

January		Enero
February	Febrero
March		Marzo
April		Abril
May		Mayo
June		Junio
July		Julio
August		Agosto
September	Septiembre
October		Octubre
November	Noviembre
December	Diciembre

So if you now use \{monthname}\ and the current month in English would be July then the Spanish replacement would become Julio. Another example of using variables in Code Replacement would be to make sequences of often-used variables entered more quickly. For instance if you often used the set of variables {day} {monthname} {year4} in your captions you could create an entry in your Code Replacement file that looks like this: mydate {day} {monthname} {year4} Then instead of typing in all of those variables or entering the date manually, you would just enter: \mydate\ and your photo’s date information would be replaced. Code Replacement can be used any time you have commonly entered terms that you tire of entering each time. Code Replacement works in every text field of the IPTC Info and IPTC Stationery dialogs.

Advanced Code Replacement

You can combine multiple Code Replacements with variables to discover huge gains in timesaving. Here is a theoretical example: Imagine a scenario where you have a team of 4 photographers covering an event, say a music festival with 4 stages over a a period of a few days, and you're downloading all their photos from different days into a single contact sheet. If you take some time beforehand to set up a code replacement file using variables, you can save yourself a ton of time. You can differentiate the images from each photographer by using the serial number of their camera. Here is an example code replacement file that lists the serial number of each camera along the name of each photographer, which stage they are covering, and the name of the performing artist, all separated with tabs, along with a simple single code replacement for the name of the music festival.

Code Replacement Anatomy2.jpg

So now even though you have photos from different photographers shooting different subjects in different locations on different dates, you can put a single caption in the IPTC Caption field for all photos from that shoot.

\{serialnum}#3\ performs on the  \{serialnum}#2\ at the \bmf\ on {monthname3} {day}, {year4}. Photo by staff photographer \{serialnum}#1\ 

Now all the photos from Jimmy's camera will have this as a caption:

David Crowie performs on the Montana Stage at the Big Music Festival presented by Trustworthy Motors on
Jan 6, 2013. Photo by staff photographer Jimmy Bits

While all the photos from Rita's camera will have this as a caption:

Taylor Sleaux performs on the Colorado Stage at the Big Music Festival presented by Trustworthy Motors on
Jan 4, 2013. Photo by staff photographer Rita Reflex

Now suppose that at the last minute, Trustworthy Motors pulls out of their sponsorship and are replaced by Guzzleade energy drink. You can simply change the one line in your code replacement file and reapply it to your photos and you're set.

More Code Replacement Ideas

Code Replacement can be used in any of the fields of the IPTC Stationery Pad. This means it can help speed up things like Keywording. For example, if you are a Wedding photographer who archives files with keywords to be able to find them later, you could set up a Code Replacement file that covers your common keyword fields

familyname	Davis
groomname	Dave Davis
bridename	Jane Jensen
motherofbride	Dorothy
motherofgroom	Diane
bestman		Bert Baker
maidofhonor	Betsy Bouffant

Then you could keep a saved IPTC Stationery Pad that you plan to reuse with keyword field that contains items like \familyname\ and \maidofhonor\ etc. You could then keep the same Stationery Pad and just edit your Code Replacement file before or after each shoot to match the members of that wedding.

You can also use Code Replacement to adjust the way Variables work. For example, using the {lt} variable for "lens type" will insert something like "EF24-105mm f/4L IS USM" If you prefer a shorter description for that variable, you could set up Code Replacement file with this line:

EF24-105mm f/4L IS USM	24-105mm f/4L IS

and then use \{lt}\ in your Stationery Pad to insert the new shorter value. And since you can load multiple Code Replacement files, you can keep this one in the list all the time even as you swap out other Code Replacement files.

Code Replacement FIles

A common mistake when first working with Code Replacements is to make files that don't have the right formatting to work with Photo Mechanic. It is imperative that you create a file in plain text without any rich text or HTML formatting. Programs like Microsoft® Word® or TextEdit can sometimes change your formatting without warning. We recommend using a text editor that makes it easy to create plain text files. Free examples of these are Notepad++ for Windows or TextWrangler for the Mac, but these are not the only options. Also, we repeat that it's crucial that you place one TAB between each column in your Code Replacement file. Using multiple spaces instead of a Tab will not work. Advanced users working with complex Code Replacement files can even use a spreadsheet program like Microsoft Excel®or Google Sheets to create and keep track of them, and then export that file as "Tab Delimited Text" format for use in Photo Mechanic.


Another method for speeding up captioning is “Autocomplete” which is a realtime word completion feature that can use lists of words in a text file that you create, words from the IPTC field lists, or even {variables}. Autocomplete is off by default, but you can enable it with the “Set Autocomplete...” menu item on the “Settings” submenu found in the “Edit” menu. This command brings up the following dialog.

Pm autocomplete.jpg

You can enable and disable using words from each of the sources by checking or unchecking the checkbox to the left of each of the sources. You can enable or disable the feature entirely by setting the “Enable Autocomplete” checkbox appropriately. The last checkbox, titled “When editing IPTC fields, only allow completions from the field’s own list” when set makes it so that none of the other sources will be considered even if they are enabled. Instead only the list of words or phrases in the popup menu to the right of the IPTC field that you’re editing will be looked at for completing words you’re typing.

When creating your own text file for Autocomplete, make sure that you enter one word (or phrase) per line and that you save out the text file in the UTF-8 encoding if any of the letters you’ve entered have accents on them or are written in a non-Roman script such as Japanese (Hiragana, Katakana, or Kanji).

Using Autocomplete

Autocomplete is easy to use. Just type like you normally do and when Autocomplete senses that you’re entering the first few letters of one of its words or phrases, it finds the first alphabetical match and completes the word. Here, a user has entered the three letters ‘Por’ into the IPTC Stationery Pad’s City field and Autocomplete has found the cities named Portland and Portsmouth in its list. "Portland" is alphabetically first, so it is the first choice:

PM autoc1.jpg

From this point, If you wanted Portland, you can press the TAB key to accept the match and move on. (If you need to type more into the field than just "Portland" you can use your keyboard's right-arrow key to accept the match and stay in that field. Or, if you wanted Portsmouth, you can click your keyboard's down arrow to select Portsmouth and then TAB to select and move on.

Alternately, if you don't want to hunt for the down arrow, you can keep typing letters until your choice is the only one remaining, and then hit TAB and go.

PM autoc2.jpg

This feature is meant to save time, so use whatever method is faster for your fingers.

Previous versions of Photo Mechanic were limited to single words for Autocomplete, but it now can handle longer phrases as well. For example, if you have a line in your text file like

At the corner of forever

And if your settings are to Autocomplete after two letters, simply typing "At" in a field will give you the full phrase option:

PM autoc3.jpg

The IPTC Stationery Pad, Code Replacement, and Autocomplete are features that strive to make captioning many photos as quick and efficient as possible.