Importing metadata into P5 Archive

Download the script

Archiware P5 Archive as Media Archive - How to automatically import metadata from file headers in macOS

Starting with version 4.2 you can specify a script for metadata to be imported into the metadata fields of the archive index. That means searching will be extended to cover the metadata imported. For each Archive Plan one or more scripts can be used, each specifying which attributes to import according to expression or extension.

This is what we want to achieve:
Available metadata from the file header to be imported automatically into P5 Archive metadata fields.

Start in P5 and configure an Archive. The easiest way is the setup assistant. It could be disk or tape based archive. Now an Archive Plan and storage for the archive is in place.

Decide what metadata is of interest: Select a file and choose Get Info from the file menu to see what metadata is available.

For the script you need the internal names of these metadata fields.

In the Terminal do a cd for the directory
Then do a mdls for the filename (in our example DSC_0003.JPG)

This results in a list of available metadata and the respective internal names.

Copy the internal names of the metadata that you want to import into the script as additional attributes.

This is how the information is collected in terminal, put into the script and also in P5 Archive metadata fields.

Now P5 Archive has to be instructed of what to import and display as metadata.
In P5 Archive go to:
“Archive”
“Advanced Options”
“Manage Indexes”
“Default archive Index”
(ctrl click or right click) “edit fields”

Add fields with names that were added in the script.

Now the Archive Plan has to be connected to the script.
In P5 go to:
“Archive”
“Archive Plan”
“Metadata Import”
“New” (User defined Metadata Import Scripts)

Enter path to metadata import script, and the file extension that it applies to (*.jpg)
Add value for timeout (120sec).
Press “Apply”

All metadata is searchable in addition to the filename, archive and modification date. Search criteria can be combined.