fitterhappier/duti — pull request #2 by nivekkagicom (2013-05-07 14:11:34+00:00)
Title: new options to dump declaration for an extension or UTI

I've added a couple of options to duti to display the UTI declaration(s) for either an extension (-e) or UTI (-u). I hope they might be of worth to others.

The output is as follows:

# duti -e csv
identifier: public.comma-separated-values-text
description: comma-separated values
declaration: {
UTTypeIdentifier = public.comma-separated-values-text
UTTypeTagSpecification = {
public.mime-type = [
text/csv
text/comma-separated-values
]
public.filename-extension = [
csv
]
}
UTTypeConformsTo = [
public.delimited-values-text
]
UTTypeReferenceURL = http://www.ietf.org/rfc/rfc4180.txt
UTTypeDescription = comma-separated values
}
# duti -u public.delimited-values-text
description: delimited text values
declaration: {
UTTypeDescription = delimited text values
UTTypeConformsTo = [
public.text
]
UTTypeIdentifier = public.delimited-values-text
}