AskGit Newsletter

Share this post
Language Detection Functions now Available
askgit.substack.com

Language Detection Functions now Available

AskGit now supports SQL functions for detecting languages and file types leveraging the open-source enry project

Patrick DeVivo
Jul 27, 2021
2
Share this post
Language Detection Functions now Available
askgit.substack.com

The enry project describes itself as a

Programming language detector and toolbox to ignore binary or vendored files. enry, started as a port to Go of the original Linguist Ruby library, that has an improved 2x performance.

The AskGit v0.4.1 release integrates enry capability as SQL scalar functions, so for example:

SELECT path, enry_detect_language(path, contents) AS lang FROM files

will list every file in a repo’s HEAD and report back the detected language (according to enry). You can find a full list of the implemented enry functionality in our README, copied in summary below:

  • enry_detect_language

  • enry_is_binary

  • enry_is_configuration

  • enry_is_documentation

  • enry_is_dot_file

  • enry_is_generated

  • enry_is_image

  • enry_is_test

  • enry_is_vendor

As usual, check out the demo site to try queries in your browser 🎉

Comment
Share
Share this post
Language Detection Functions now Available
askgit.substack.com

Create your profile

0 subscriptions will be displayed on your profile (edit)

Skip for now

Only paid subscribers can comment on this post

Already a paid subscriber? Sign in

Check your email

For your security, we need to re-authenticate you.

Click the link we sent to , or click here to sign in.

TopNew

No posts

Ready for more?

© 2022 AskGit, Inc.
Privacy ∙ Terms ∙ Collection notice
Publish on Substack Get the app
Substack is the home for great writing