Can unknown types be checked against /usr/bin/file to see if they are text? #255
BruceH2020
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm using ConTeXt (a typesetter in the same vein as LaTeX) which generates .log and .tuc files. For some reason the .log files are public.plain-text (amongst others) and preview fine. The .tuc files however have a dynamic UTI (pasted below) and don't preview. This is annoying because /usr/bin/file identifies them as "tt.tuc: Unicode text, UTF-8 text" and previewing them as plain text would be perfectly fine.
So my request is: please can you add a /usr/bin/file check for an unknown type just in case it is plain text anyway?
Failing that, can you add the ability to specify any filetype and link to any UTI and I'll take the consequences of screwing it up? (The .tuc files actually contain Lua data structures so being able to Lua highlighting would be great.) Maybe hide under an 'advanced users' tab?
FWIW, .tuc shows as:
$ mdls -name kMDItemContentType -name kMDItemContentTypeTree tt.tuc
kMDItemContentType = "dyn.ah62d4rv4ge81k7pd"
kMDItemContentTypeTree = (
"public.item",
"dyn.ah62d4rv4ge81k7pd",
"public.data"
)
[Edited to add the note about Lua data structures and correct the UTI type of the .log files.]
Beta Was this translation helpful? Give feedback.
All reactions