pixelgeek Posted March 1, 2023 Share Posted March 1, 2023 I have a very basic Workflow that has a File Filter input and an Open object. If I set the File Types in the File Filter by dragging one of my Markdown files into the Types area and then run it the Filter won't display any files. If I remove the File Type it will see the Markdown files and list them. Is this a bug or am I doing something wrong? The Markdown file I am using to set the File Type is from the directory listed in the Scope. Link to comment
pixelgeek Posted March 1, 2023 Author Share Posted March 1, 2023 (edited) So it isn't a bug but it is a result of everyone and their uncle declaring a different UTI for Markdown files. I have four different UTIs listed on my Mac net.daringfireball.markdown com.unknown.md net.daringfireball public.markdown Once I added all of them to the File Type list it was able to show the Markdown files in the File Filter. If anyone ever needs to track down the same issue this is the command you can use in the Terminal /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -dump | grep 'uti:' | awk '{ print $2 }' | sort | uniq This would probably also be an issue if one had multiple apps attempting to create different UTIs for an open file type. Edited March 1, 2023 by pixelgeek Fix grep error giovanni and Stephen_C 1 1 Link to comment
Stephen_C Posted March 1, 2023 Share Posted March 1, 2023 Thanks for the very helpfui post: most useful. I use markdown a lot. Stephen Link to comment
pixelgeek Posted March 1, 2023 Author Share Posted March 1, 2023 So I found a quicker way to get a list of UTIs for an extension. It does require the duti command line app in order to run. You can get it from their website or use brew brew install duti Once you have that installed you can just run duti -e .md | grep UTTypeIdentifier | awk '{ print $3 }' and get a list of the UTIs from there public.markdown com.unknown.md net.daringfireball.markdown net.daringfireball I will make a Workflow for it tomorrow. Still suffering from a cold so I think I am at my limit for today 🙂 Link to comment
Stephen_C Posted March 1, 2023 Share Posted March 1, 2023 I shall be interested to see how you get on with finding markdown files. I wrote a small workflow following your earlier post (to search for markdown files) but it's producing some pretty odd results at the moment (notably failing to find some in the folders I've specified and finding some which are not in specified folders). I'm wondering if I'm simply still running into some aspect of the seeming Ventura search scope bug. Stephen Link to comment
pixelgeek Posted March 1, 2023 Author Share Posted March 1, 2023 That might be the case. I haven't updated as of yet Link to comment
pixelgeek Posted March 2, 2023 Author Share Posted March 2, 2023 I have released an initial version of the Workflow to find the UTIs for a specified file extension. https://github.com/lolbat/Alfred-Workflow-Read-UTI Link to comment
Stephen_C Posted March 3, 2023 Share Posted March 3, 2023 On 3/1/2023 at 9:14 PM, Stephen_C said: I wrote a small workflow following your earlier post (to search for markdown files …which now works perfectly, thank you! Stephen Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now