mntnr / build-a-space

Automatically add community documentation to your repository
https://maintainer.io
MIT License
21 stars 3 forks source link

Grab SPDX license code and populate with license file if it doesn't exist #58

Open RichardLitt opened 7 years ago

wooorm commented 7 years ago

Could you expand on this? Such as with an input (readme.md) / output (LICENSE) example?

wooorm commented 7 years ago

I’m especially interested in what you’d like now, and what you’d like somewhere in the far away future!

RichardLitt commented 7 years ago

Input: Repo with a README that has this at the bottom:

MIT © author

Or something similar, and no license file. Create the MIT license, cat it into a LICENSE file, and then link it in the Readme ([MIT](LICENSE) © Author).

RichardLitt commented 7 years ago

In the future, I'd like to fix all inconsistencies and make sure that the license included is the one specified. Take all of the manual work away from the users.

wooorm commented 7 years ago

From you second comment, what do you expect to happen now (not the future), if ISC © author is in the README?

RichardLitt commented 7 years ago
// pseudo-js

if (readme.contains('ISC © Name') && license.file !== true) {
     fs.writeSync({to: LICENSE.md, type: ISC_DOCUMENT, licensee: 'NAME'})
}

Basically. Make sense?

wooorm commented 7 years ago

Well that one makes sense, yes, but I was kinda looking for how long the list of supported (for now) licenses should be! Just supporting MIT (and/or ISC) is a very different task compared to supporting all licenses!

RichardLitt commented 7 years ago

Make it so that we can add to it. At the beginning: MIT, ISC, Apache should be enough.

RichardLitt commented 7 years ago

@wooorm This isn't a priority, issue, though. See the top issues in 'To Do' on https://github.com/mntnr/build-a-space/projects/1 for that.