Closed kalkin closed 7 years ago
Hmm, I see my aproach might be too simple
I think a much better approach would be to use filemagic
or Github's linguist
(there's a python clone). The problem with shebangs
is that they are uniform some people define it as #!/usr/bin/python
, some add the path to env
, and others even have non-standard paths.
@sk- douban/linguist doesn't work for me.
Installing it for Python 2 works, but executing it, it complains that it's missing the Jade lexer. I installed the Fedora package openjade
and also python-jade
from pip, but both seem not to satisfy linguist
. I could work around by following the hint in this issue douban/linguist#22 but still it's sub-optimal.
Installing it for Python 3 fails compiling charlockholmes
with gcc compilation errors, which look like the c wrapper wasn't migrated to Python 3.
Both projects linguist
& charlockholmes
look abandoned. It will take some work to fix, update them and even may be release/maintain the forks on pypi. May be we could split the work? Every one of takes the responsibility over one dependency? Of course I would only do all the work if you really plan to integrate linguist
.
This commit allows specifieng the shellbang via
shellbang
key by providing the executable line. Theshellbang
value should not contain the actual shellbang (#!
) to ease up YAML integration.