Support detecting a language from content only
Looks like the CLI version doesn't support detecting a language from just content, but the main repo does.
Thank you for the suggestion!
Do you have an example in mind, how do you think this should work with the CLI interface?
Providing a simple CLI option and providing the code through either a file or stdin (or allowing both).
Yes it seems it doesn't support https://github.com/go-enry/go-enry/#by-text . Actually I guess currently only guessing by extension is supported by the tool.
There is a -mode option but it seems doesn't change the outcome.
To test, copy a C file and change its extension to py or go. enry detects py and go respectively. Even when the file has no extension, none of the -mode options report anything other than text
I was looking at your change at https://github.com/jeremy-jameson/enry/commit/b7a5521727fd042bd095c7fea1fd7de65e91578d since I also need to detect by text. I ended up testing your build on Windows, and it's almost working for my purposes. However, I need to add a few more languages to your list, and I'm struggling to understand how to build it. Any pointers would be much appreciated.
I'm struggling to understand how to build it.
Usually, running go build . from the checkout is enough. And, indeed, creating a custom binary that supports your use case is the simplest way to go.