forkability icon indicating copy to clipboard operation
forkability copied to clipboard

License auto detection in the README file

Open abderraouf-adjal opened this issue 10 years ago • 6 comments

Hello, I suggest auto detection for the license in the README file.

abderraouf-adjal avatar Sep 01 '15 14:09 abderraouf-adjal

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?

basicallydan avatar Sep 01 '15 15:09 basicallydan

Searching word License & Copyright in README or README.md or README.txt headlines...

abderraouf-adjal avatar Sep 01 '15 15:09 abderraouf-adjal

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?

thinkingmedia avatar Dec 08 '15 15:12 thinkingmedia

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.

M-Zuber avatar Dec 08 '15 15:12 M-Zuber

Oh, and tests :)

M-Zuber avatar Dec 08 '15 15:12 M-Zuber

No, I wouldn't pull my code. I'd have to rewrite it but it shouldn't take long.

thinkingmedia avatar Dec 11 '15 14:12 thinkingmedia