Filter.ByUTIs

Description

DropPy extracts all types of data it finds in your dropped object. In many cases this is more than you want.

Here’s where Filter.ByUTIs comes in. This Task allows you to only continue with certain data types, for example images - but not text.

The way this is achieved is by passing the desired file’s UTIs (Uniform Type Identifiers) - basically strings that describes the file’s content.

To find out what UTIs make sense for your Workflow just enable DropPy’s Development Mode, select the Workflow Extract all contained data, drop your object and look at the resulting timestamped folder in your Downloads directory.

Note: Filtering by extracted data type / UTI is not the same thing as filtering by file extension. Use the Task Filter.ByExtensions for this.

Arguments

  • utis (optional) is a list of strings that contain the UTIs of the files that should get passed on to this Task’s output directory. All other files will be not be available for the next Task.
# utis = ['files']  # default
utis = ['public.tiff', 'files', 'files.promised']
  • flatten_dir (optional) is a boolean that allows control over the directory structure in the Task’s output directory. If set to True all extracted files will be mixed in with each other in the output directory (overwriting may occur!). If set to False you get one subdirectory for each UTI.
# flatten_dir = True  # default
flatten_dir = False

Requirements

Python (Non-Standard-Library Packages)

None.

External Executables

None.

API Credentials

None.

Resources