2 ms·
GitHub detects the presence of README files by file name. It'd be pretty easy to do that for LICENSE files too of course. Look for LICENSE, MIT-LICENSE, etc.
by technoweenie 15y ago
GitHub detects the presence of README files by file name. It'd be pretty easy to do that for LICENSE files too of course. Look for LICENSE, MIT-LICENSE, etc.
The trick is actually identifying what type of license it is.
Pop quiz: What license is this?
https://github.com/sinatra/sinatra/blob/master/LICENSE https://github.com/sinatra/sinatra/blob/master/LICENSE
This problem would be perfect for a tiny ruby script like Linguist: https://github.com/github/linguist https://github.com/github/linguist. Just something simple that's given some filenames and contents that can return the license type.
It'd also be nice to handle non software licenses, such as creative commons. I'm not sure what the convention is for specifying that in Git repositories, however.
- insertnickname 15y agoThat's the MIT license.
- technomancy 15y agoMIT-X11 license to be precise; MIT has spawned a number of licenses.