.erb files in finder quicklook preview no luck - solved

I tried to get the finder to show .html.erb files in the icon and spacebar>preview to show the contents so I added the erb filetype (dyn.ah62d4rv4ge80n6xc) to the qlcolorcode plist using the xcode editor. the icon then shows the contents (too small), however the spacebar preview does not work and macos say qlcolorcode is broken and should be shown the door. Is there an easier or any way to show the plaintext content of erb files in the finder like it does with javascript or .rb files?

There is a ‘Quick Look Extension’ app in the App Store perfectly capable of doing this: Peek

I attached a screenshot:

It also does the spacebar ‘Quick Look’ views:

1 Like

that is a very nice app. Thank you for sharing, did not know about it. Might use that in the future yes. but its only .erb I am missing (the other one, .jbuilder, works with the extension .txt and the finder remembers that even when relaunched so I put an apple script to add txt to all the jbuilder files in a project and then remove it). I am now going down the rabbit hole and building a qlgenerator for erb in xcode with copilot, chatgpt and meself - wish me luck. :upside_down_face:

Ok, today while reinstalling Monterey I found how to do it. I took the qlstephen quicklook plugin and plonked it into Library/quicklook - then I opened its info.plist with text edit. in there I added this:

<string>dyn.ah62d4rv4ge80n6xc</string>

it needs to go … hang on,… into the LSItemContentTypes array. I also put public.css in there and will add some more I am sure. and tadaaaa - quicklook! :slight_smile:

now, when the OS comes and says qlstephen is damaged and should be thrown in the trash - you do:

xattr -d com.apple.quarantine /Users/yourshortname/Library/QuickLook/QLStephen.qlgenerator

and the the nagging goes away and the plugin works. yay.