samuelmeuli / glance

🔎 All-in-one Quick Look plugin
MIT License
963 stars 68 forks source link

Support for Sequel Pro files #19

Closed JvSomeren closed 4 years ago

JvSomeren commented 4 years ago

The output of mdls on my system is as follows:

kMDItemContentType     = "com.sequelpro.sequelpro.sql"
kMDItemContentTypeTree = (
    "com.sequelpro.sequelpro.sql",
    "public.plain-text",
    "public.text",
    "public.data",
    "public.item",
    "public.content"
)

Would it be possible to support this?

samuelmeuli commented 4 years ago

Sure! I found a few more UTIs in Sequel Pro's repository. Besides com.sequelpro.SequelPro.sql, two others implement public.plain-text, so it should be possible to generate previews for them:

Would you be able to find out what kind of data is stored these files so we can apply syntax highlighting to them?

JvSomeren commented 4 years ago

I would be happy to help! Just not quite sure what you are referring to with "kind of data". These .sql-files are just regular SQL dumps in my case, so probably just plaintext? It's just my OS associates these files with Sequel Pro.

samuelmeuli commented 4 years ago

I'm wondering what kind of information is stored in spf and spTheme files, so I can specify the correct language for syntax highlighting. spTheme seems to be XML. I couldn't find an example for spf yet, would you mind trying to generate one and seeing what's in it?

JvSomeren commented 4 years ago

Aha! I was able to export a .spf-file, just like spTheme it's XML. Hope this helps :)

samuelmeuli commented 4 years ago

Added, thanks!

JvSomeren commented 4 years ago

Awesome! Thank you too!