build-a-space icon indicating copy to clipboard operation
build-a-space copied to clipboard

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

Open RichardLitt opened this issue 8 years ago • 9 comments

RichardLitt avatar Nov 16 '17 15:11 RichardLitt

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

wooorm avatar Nov 18 '17 21:11 wooorm

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

wooorm avatar Nov 18 '17 21:11 wooorm

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 avatar Nov 19 '17 02:11 RichardLitt

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.

RichardLitt avatar Nov 19 '17 02:11 RichardLitt

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

wooorm avatar Nov 20 '17 15:11 wooorm

// pseudo-js

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

Basically. Make sense?

RichardLitt avatar Nov 20 '17 15:11 RichardLitt

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!

wooorm avatar Nov 20 '17 15:11 wooorm

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

RichardLitt avatar Nov 20 '17 15:11 RichardLitt

@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.

RichardLitt avatar Nov 20 '17 16:11 RichardLitt