Dump Metadata

From time to time in order to track down an issue, we need a copy of the metadata in one or more tracks. Sending us the metadata is usually easier and faster than sending the tracks themselves. This action exports the metadata from all selected tracks. The action also preserves the initial filename and duration and various other properties. You can choose to export only textual metadata or everything including artwork.

The action serves as an example of generating external scripts on the fly. The action generates a script and then executes it. The script zips up the exported metadata files and then deletes them. The action then deletes the generated script file.

----- Start of action 'Dump Metadata'

'

This action will export the metadata of all selected files into a zip file. You can export all metadata or only the textual data (omitting artwork).

The exported metadata is saved in a zip file named ~/Documents/metadata.zip

Ask

This action will export the current metadata of all loaded files.

Select Text Only to only export textual metadata.

Select All to export all metadata including artwork, etc.

The exported metadata will be saved to ~/Documents/metadata.zip Hide Info True=All False=Text Only

Action Test State to named variable 'Do All'

'

Make sure the export folder is empty

Set named variable 'script' to "#!/bin/sh\n\nrm -rf YateMetadataDump\n"

The next statement writes the script file. Note that the filename extension is yatesh. The only reason for that is the Run External statement will ensure that a script can be executed if it has that extension.