Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I alias a given extension (.ttx) to a desired syntax (XML)? #299

Open
frankrolf opened this issue Jan 3, 2025 · 3 comments
Open

Comments

@frankrolf
Copy link

I am working with .ttx files, which use XML syntax.
mdls recognizes a ttx file as follows:

kMDItemContentType                 = "org.fonttools.ttx"
kMDItemContentTypeTree             = (
    "org.fonttools.ttx",
    "public.xml",
    "public.text",
    "public.data",
    "public.item",
    "public.content"
)

I followed the instructions for “settings for plain files”, but I am not certain this is the right place to achieve what I am after.
Here is what I tried (which might be completely wrong – sorry):
image

What would I need to do to achieve what I’m after?
A PR perhaps, like here? db30a2c

Thanks!

@sbarex
Copy link
Owner

sbarex commented Jan 3, 2025

It is not possible. It must be done during compilation.

That panel is only used to manage files WITHOUT EXTENSION.

@frankrolf
Copy link
Author

Along similar lines – would it be possible to imagine something like UTI type “forwarding”?

Let’s say I have my own custom UTI, which is based on another one (like in this case) – perhaps I could help the app understand that I’d like to preview type x as type y? Or alternatively, just have a list of UTIs to be treated as plain text? Would definitely beat the QuickLook icon preview.

@sbarex
Copy link
Owner

sbarex commented Jan 11, 2025

UTI management is completely delegated to the operating system. It is the operating system that evaluates which quicklook extension to invoke based on whether it supports that particular UTI. So if the app has not been compiled declaring support for that format it will never be invoked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants