License auto detection in the README file
Hello, I suggest auto detection for the license in the README file.
Ooh I like it! Yes! Very good idea.
We could store a list of all the main licences and search the readme for the text. Or we could simply look for the word "licence". Thoughts? Any more ideas?
Searching word License & Copyright in README or README.md or README.txt headlines...
I implement a LICENSE detection scheme for a readme generator. It works by parsing the LICENSE file with a high accuracy. Can match licenses even if the file has been edited.
The code is implemented here:
https://github.com/thinkingmedia/readme-plus/blob/master/src/services/licenses.js
It requires a cache of LICENSE files that are used as reference:
https://github.com/thinkingmedia/readme-plus/tree/master/src/services/_licenses
Would you like a pull request for this feature?
Please do open a pull request. I noticed that the js code you linked to, does not exactly follow our style conventions. If you can understand by looking at existing code - :+1: Otherwise I will make individual comments on the PR.
Oh, and tests :)
No, I wouldn't pull my code. I'd have to rewrite it but it shouldn't take long.