Record type and Kind

Good afternoon,

Is the “picture” record type in AppleScript:

image

the same as “Kind > Image” in Rules and Groups windows

image

and, either way, is there info on the file types which these definitions equate to?

I couldn’t see anything in the Manual or in the Forums which seems to indicate the file types in either.

Thanks,

Sean

Here (ScriptDebugger) I’m seeing as properties of a selected avif image:

kind: “AV1 Image File Format”

record type: picture

In toolbar search, if I set Kind: image

I get jpeg, png, webp, heic, psd and all other image format types

There’s no “record type” label in the dropdown to select a condition

Yes, I’m wanting the full lists (if they exist) so I compare the “Kind > Image” Search/Rules selection and the scripting “picture” record type.

Look in the scripting dictionary, it’s all listed there :slight_smile: type is a property of record

1 Like

I cannot see in the .sdef where it says what file types are of record type “picture”, so would appreciate a pointer to that. For example, I know PDFs are not, but “.pict” files are, etc. I’m trying to find that definition.

Just to be clear, is this the record definition you’re talking about?:

Under that is the record type section I posted earlier, which has a valid value of “picture” (amongth “group/‌smart group/‌feed/‌bookmark/‌formatted note/‌HTML/‌webarchive/‌markdown/‌txt/‌RTF/‌RTFD/‌picture/‌multimedia/‌PDF document/‌sheet/‌XML/‌property list/‌AppleScript file/email/unknown”) – so what types of “pictures” does “picture” include?

I know some of them, but I’m sure there will be some which don’t appear in my databases.

Same goes for the “Kind is Image” Search/Rules criteria I posted a screenshot of earlier - it matches the AppleScript record type “picture” for the file types in my databases, but that doesn’t guarantee they are an identical collection of file types.

Is there a list of file types which are considered by DEVONthink to be of “Kind” “Image”? That certainly won’t be in the dictionary, so I’m still no closer to what I actually asked for in the first place.

Do these attributes inherit something from the OS that defines the file types which those attributes encompass?

Is it set by the DEVONthink developers to include or exclude file types to be considered “Images” or “pictures”?

Sean

No, it’s not.

record type is a property of record.

no type property there.

type is used in DT3, in DT4 it’s called record type and that is a synonym for type:
From the sdef file (not what script editor shows you).

<property name="record type" code="DTrp" description="The type of a record. WARNING: Don't use string conversions of this type for comparisons, this might fail due to known scripting issues of macOS." access="r">
    <synonym name="type" code="DTty" hidden="yes">
          <cocoa key="type"/>
    </synonym>
    <synonym code="type">
           <cocoa key="type"/>
    </synonym>
    <type type="data type"/>
        <cocoa key="type"/>
</property>
2 Likes

@chrillek is spot on with is response.


In a smart rule, batch process, or search, Kind is essentially equal to type, e.g., it’s an Image not a JPEG. Specific file types would be the extension.

In scripting, kind is what you’d see in the Finder, e.g., Formatted Note. record type or type is an internal non-localized property.

Since this is a localized value, we generally recommend using record type or type.

I’d ask that my requests perhaps be reviewed again.

I’m not asking about “kind” in AppleScript, and I’ve shown by screenshots for context what I’m asking.

I’m asking which file types are shown if you choose “Kind is Image” when doing a search in the DEVONthink UI, and which file types will return “picture” as the record type when scripting.

When I say file types, I mean what I would have expected that term to mean, e.g. TIFF files, PNG files, JPEG files, etc. But there will be many other file types found by a search for “Kind is Image” and which will return “picture” as the record type of a record in AppleScript, so no answers yet are, in fact, spot on.

BTW, I have some files which simply show as “Documents” in the Kind column in the UI, have no extension, but which are found via “Kind is Image” and display their data as images, so it’s not just about extensions.

I’m not exactly sure why it’s so unclear what I’m actually asking for, and why I’m getting the answers I am.

Does it help if I rephrase it as: is there a list of graphics formats which are shown in the results of “Kind is Image” searches and which will return “picture” as the record type of a record in AppleScript?

And if so, is it really that far from what I originally asked?

Sean

Perhaps they are mapped to the UTIs beginning with image. Anyway, that question is not related to the topic of the post nor the “Automation” cateogry, which might be the reason why you are misunderstood. New question, new thread.

@cgrunenberg would have to comment but it doesn’t appear to be based on UTIs as .svg has a UTI of public.image but isn’t considered matched by Kind is Image. However, a .psd file is matched. That leads me to think it may be a curated list, similar to plain text extensions.

2 Likes

It seems I read your post too fast, sorry about that! I read it on my phone, which made your screenshots small enough that I somehow completely missed them. I wouldn’t have pointed you to the scripting dictionary if I saw you were already looking there.

And I’m used to the DT3 dictionary, where the property is just type, as chrillek explained.

I don’t know of any explicit list of formats. I would expect any image format to return the record type of picture – I haven’t encountered any exceptions myself. But at this point it looks like I should refrain from further comments and let the experts speak.

1 Like

PS…

2 Likes

… and here. Interesting, why do you get “Photoshop document” and I do “Adobe Photoshop document”?

1 Like

It’s what’s reported by the Finder. And I don’t have Photoshop installed on this Mac.

1 Like

Hm. Interesting.

1 Like

But that is not a comprehensive list, just what is currently in your database.

If I’m looking to automate anything by record type (my primary aim [and half my query], which is why the question belongs, and will remain, here, @chrillek), I’d like the comprehensive, curated list of formats, if it exists.

If it’s inherited from somewhere else (e.g. OS), a statement of same is sufficient, as I’m not expecting that level of handholding.

If the DEVONthink developers do their own curation, and are prepared to share it, or already have, I would appreciate seeing it.

Thank you, @BLUEFROG and @troejgaard for your contributions – Jim, SVG is an example of what got me looking into this, along with wanting to see how aligned “Images” and “pictures” were to each other (to see how aligned automation and UI would be from the user’s perspective, as well as comparing them both to the standard MIME types for my AppleScript attachments separation project.

Sean

I am well aware of that. It wasn’t advertised or intended as anything but an example of querying the database based on the type, record type, and kind for readers now and in the future.

And as I already mentioned…

1 Like

Thanks for clarifying, without any annotation, intention was entirely ambiguous :folded_hands:t2:

Sean

1 Like