Quantum

Adding OSX colour tags to files using a Worker action

This document provides the user with guidance on setting a Worker action (OSX only) to add colour tags to a files via a Python script.

As a prerequisite to this exercise you must have Python installed on you workstation, which can be downloaded from the following link: – https://www.python.org/downloads/mac-osx/.

You will also require a copy of the Python script that will be called by the Worker to rename the files. This can be downloaded from the following link: ftp://support.squarebox.com/pub/download/tagfile.py.zip.

The first step is to create an appropriate tag field; in this example user defined field “User1” is configured to read “FileTag”.

Create a pick list for this field; in the example shown the colours “Red”, “Green” and “Blue” were added to the pick list.

Select three media files and assign them each a unique colour FileTag from the pick list that you previously created.

Screen Shot 2015-07-09 at 16.26.21Screen Shot 2015-07-09 at 16.26.31Screen Shot 2015-07-09 at 16.26.29

Publish the changes to the server.

Screen Shot 2015-07-09 at 16.28.27

Review the files in the Finder utility to check that they have not already been tagged.

Screen Shot 2015-07-09 at 16.27.30

 Open CatDV Worker and create a new Worker job if one does not exist already.

Screen Shot 2015-07-09 at 16.29.04

Configure your server settings if required.

Screen Shot 2015-07-09 at 16.29.12

Now create a new Server Query and add job name and description details, click the visible tick box.

Screen Shot 2015-07-09 at 16.29.37

On the Server Query tab, under Query Terms add your user defined field from the pick list, in this instance “User 1”, click the “NOT” tick box to the left of it and set the option to the right of it to “is blank”. This is effectively telling the Worker job to ignore all files where the user defined variable is blank.

Screen Shot 2015-07-09 at 16.29.49

In the Processing Steps tab add another processing step by clicking the plus button. This will open up another window. Select “Execute Command” from the pick list.

Screen Shot 2015-07-09 at 16.29.57

Key in the additional command details in the “Command Line“ window as demonstrated below; where tagfile.py is the Python script which carries out the tagging routine, ${U1} represents User Field 1 and $b points the Worker to the original directory path.

Execute command eg

 In the Publish tab set the “Publish to Server” option to Publish changes, set “Media Path = “to last copied/moved file” and set “Extra fields” to the name of the user defined variable. Click OK to go back to the main Edit Configuration window.

Screen Shot 2015-07-09 at 16.30.24

In the Watch Actions tab click apply.

Screen Shot 2015-07-09 at 16.30.49

The Worker will now process the newly created job and add tags to files to the files that were selected earlier on in this tutorial.

Screen Shot 2015-07-09 at 16.31.04

You can verify the changes by opening up the directory with the Finder Utility to see whether the tags were added to the files.

Screen Shot 2015-07-09 at 16.31.12