In addition to templates, FotoStation can use text macros for more advanced automated editing of metadata. Macros makes it possible to add or modify field content, retaining or overwriting the existing metadata in the field. Macros also let you specify conditions that must be met before the metadata is modified.
Creating a text macro
Where: Expand the Metadata node, then expand the Text macros node.
Click on the New button below the list of macros to create a new one.
Name the macro by typing a name in the Macro name field at the top of the window. Now you can start adding fields to modify and set conditions by clicking on the Add Field button.
The dialog that opens now lets you set a number of parameters:
Field to Add: Choose the field whose contents you wish to modify in this dropdown list.
Action: Choose how you would like to modify the field. You can choose between Clear Field (clears all metadata in the field), Add to previous content (appends the information you choose after any existing information in the field), Replace all previous content (overwrites any existing information with your new information), Add substring in previous content (makes it possible to add information to a field directly after a specified string) and Replace substring in previous content (lets you replace a string in the specified field with another string).
Field Content: Type in the information that you would like to add to the field in question. Clicking on the Insert Code button makes it possible to insert a dynamic operator so that you can add any kind of information from other XMP fields, file properties or digital camera information fields to the field you are modifying.
When configuring a text macro you can define conditions that have to be met before the macro is executed. Conditions are field-specific, so that a macro can modify the contents of many fields where some are modified whereas others aren’t, depending on whether the conditions set for each field are met.
To enable conditions, select the checkbox Only if the following condition is met.
Then pick a field from the drop-down list (often the same field as the one you want to modify) and choose the condition operator (Contains, Does not contain, Is empty, Is not empty) and type in the string in the field below if you chose Contains or Does not contain.
Modifying or deleting a text macro
To make modifications to an entry you create, select the field you want to modify and click on the Edit or Remove button. The above screenshot shows a macro that is set to replace the contents of the Caption field regardless of what’s already there, then add a Copyright string if the Copyright field does not already contain any information.
Importing and exporting text macros
Having selected the Text Macros node (under the Metadata node) in the configuration tree you can click on the Import button under the list of macros to import a macro from a file. Macros can be imported from .fmm files (FotoStation 6.0 XML-based files) and .ipm files from older versions of FotoStation.
To export a text macro, select it in the list and click on the Export button. Exported text macros will be stored in XML-based format with the extension .fmm.
Applying metadata to files using your macro
To use the macro you have just created, you can apply it in a number of ways:
- Through an action, using the Apply metadata template/macro action.
- From the metadata editor - just open the Macro menu and choose the one you want to apply.
- From the context menu - Select a range of files and use the Stamp tool on the toolbar to apply the metadata to all the files.